Package org.jwall.web.audit

Examples of org.jwall.web.audit.AuditEvent


    @Override
  public void run() {
      while( true ){
        try {
          AuditEvent event = readNext();
          listener.eventArrived( event );
        } catch (Exception e) {
          e.printStackTrace();
          //System.exit(0);
          return;
View Full Code Here


      reader = new ModSecurity2AuditReader( sock.getInputStream() );
    }

    public void run(){
      try {
        AuditEvent evt = reader.readNext();
        while( evt != null ){
          if( listener != null )
            listener.eventArrived( evt );
          evt = reader.readNext();
        }
View Full Code Here

            closed = true;
        }

        while(! events.isEmpty() ){
            log.debug("NetworkClientWorker: sending event..");
            AuditEvent e = events.take();
            out.writeObject( e );
            sent++;
        }
    }
View Full Code Here

                    log.debug("NetworkEventServer.Dispatcher: Sleeping until events arrive...");
                    Thread.sleep( clientPollTime );
                }
               
                while(! events.isEmpty()){
                    AuditEvent evt = events.poll();
                   
                    Iterator<NetworkClientWorkerThread> it = worker.iterator();
                    while(it.hasNext()){
                        NetworkClientWorkerThread t = it.next();
                        log.debug("Sending event to client...");
View Full Code Here



    public void run(){
        try {
            AuditEvent evt = null;

            while( !finished ){

                try {
                    evt = reader.readNext();
View Full Code Here

        database.count(FilterCompiler.parse("")).intValue());

    ScriptEvent e1 = list.get(2);
    String id1 = e1.get(ModSecurity.TX_ID);

    AuditEvent e2 = database.getRealList().get(2);
    String id2 = e2.get(ModSecurity.TX_ID);

    Assert.assertEquals(id2, id1);
  }
View Full Code Here

   
    //String remoteAddr = event.get( ModSecurity.REMOTE_ADDR );
    String fwd = event.get( ModSecurity.REQUEST_HEADERS + ":X-Forwarded-For".toUpperCase() );
   
    try {
      AuditEvent processed = resolver.processEvent( event, new HashMap<String,Object>() );
     
      String remote = processed.get( ModSecurity.REMOTE_ADDR );
      Assert.assertEquals( remote, fwd );
     
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail( e.getMessage() );
View Full Code Here

   
    try {
      int i = 0;
      URL url = EventList.class.getResource( resource );
      ModSecurity2AuditReader reader = new ModSecurity2AuditReader( url.openStream() );
      AuditEvent event = reader.readNext();
      while( event != null && i < num ){
        list.add( event );
        event = reader.readNext();
      }
View Full Code Here

   
    try {
      int i = 0;
      URL url = EventList.class.getResource( "/events.audit-log" );
      ModSecurity2AuditReader reader = new ModSecurity2AuditReader( url.openStream() );
      AuditEvent event = reader.readNext();
      while( event != null && i < num ){
        list.add( event );
        event = reader.readNext();
      }
View Full Code Here

    ListIterator<ScriptEvent> it = new ListIteratorImpl(eventList);

    ScriptEvent evt = it.next();
    Assert.assertNotNull(evt);

    AuditEvent first = database.getRealList().get(0);
    Assert.assertEquals(first.get(ModSecurity.TX_ID),
        evt.get(ModSecurity.TX_ID));
  }
View Full Code Here

TOP

Related Classes of org.jwall.web.audit.AuditEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.