org.jwall.web.audit.net
Class AuditEventConsoleSender

java.lang.Object
  extended by org.jwall.web.audit.net.AuditEventConsoleSender
All Implemented Interfaces:
AuditEventListener

public class AuditEventConsoleSender
extends java.lang.Object
implements AuditEventListener

This class implements a simple socket-handler which provides easy injection of audit-events to the modsecurity-console.

Author:
Christian Bockermann <chris@jwall.org>

Field Summary
static java.lang.String CONSOLE_HOST
           
static java.lang.String CONSOLE_PASS
           
static java.lang.String CONSOLE_PORT
           
static java.lang.String CONSOLE_URI
           
static java.lang.String CONSOLE_USER
           
static boolean DEBUG
           
 
Constructor Summary
AuditEventConsoleSender(java.lang.String host, int port, java.lang.String login, java.lang.String password)
          This method creates a new console sender that sends all arriving events to the given host host using login and password for authentifaction.
 
Method Summary
 void eventArrived(AuditEvent evt)
          Simply send all arriving events to the configured console.
 void sendAuditEvent(AuditEvent evt)
          This method sends the given audit-event to the configured console.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSOLE_HOST

public static final java.lang.String CONSOLE_HOST
See Also:
Constant Field Values

CONSOLE_PORT

public static final java.lang.String CONSOLE_PORT
See Also:
Constant Field Values

CONSOLE_USER

public static final java.lang.String CONSOLE_USER
See Also:
Constant Field Values

CONSOLE_PASS

public static final java.lang.String CONSOLE_PASS
See Also:
Constant Field Values

CONSOLE_URI

public static final java.lang.String CONSOLE_URI
See Also:
Constant Field Values

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values
Constructor Detail

AuditEventConsoleSender

public AuditEventConsoleSender(java.lang.String host,
                               int port,
                               java.lang.String login,
                               java.lang.String password)
This method creates a new console sender that sends all arriving events to the given host host using login and password for authentifaction.

Parameters:
host - The host on which the Console is running.
port - The port, at which the Console is listening.
login - User-name for authentication with the console.
password - Password for authentication.
Method Detail

sendAuditEvent

public void sendAuditEvent(AuditEvent evt)
                    throws java.lang.Exception
This method sends the given audit-event to the configured console.

Parameters:
evt - The event to be sent to the console.
Throws:
java.lang.Exception - In case an error occurs.

eventArrived

public void eventArrived(AuditEvent evt)
Simply send all arriving events to the configured console.

Specified by:
eventArrived in interface AuditEventListener