org.jwall.web.audit.net
Class SyslogAuditEventMultiStream

java.lang.Object
  extended by org.jwall.web.audit.io.AbstractAuditEventReader
      extended by org.jwall.web.audit.net.SyslogAuditEventStream
          extended by org.jwall.web.audit.net.SyslogAuditEventMultiStream
All Implemented Interfaces:
Iterable<AuditEvent>, Runnable, AuditEventReader

public class SyslogAuditEventMultiStream
extends SyslogAuditEventStream
implements AuditEventReader, Runnable

This class implements a parser for audit-logfile for the modsecurity2. It also implements the AuditEventSource interface.

Author:
Christian Bockermann <chris@jwall.org>

Field Summary
 
Fields inherited from class org.jwall.web.audit.io.AbstractAuditEventReader
DEFAULT_AUDIT_EVENT_FACTORY_CLASS
 
Constructor Summary
SyslogAuditEventMultiStream(InputStream in, AuditEventListener listener)
          This constructor creates an audit-event-Reader that reads from the given input stream.
 
Method Summary
 StringBuffer[] getBuffers(String key)
           
 StringBuffer[] initBuffers(String key)
           
 Iterator<AuditEvent> iterator()
           
 AuditEvent readNext()
          This method tries to read the next event that is available.
 void run()
           
 
Methods inherited from class org.jwall.web.audit.io.AbstractAuditEventReader
atEOF, bytesAvailable, bytesRead, close, getDataRead, getFileSize, getSectionIndex, hasNext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jwall.web.audit.io.AuditEventReader
atEOF, bytesAvailable, bytesRead, close
 

Constructor Detail

SyslogAuditEventMultiStream

public SyslogAuditEventMultiStream(InputStream in,
                                   AuditEventListener listener)
                            throws IOException
This constructor creates an audit-event-Reader that reads from the given input stream.

Parameters:
in - The stream to read from.
Throws:
IOException - In case the stream cannot be opened or another IO error occurs.
Method Detail

readNext

public AuditEvent readNext()
                    throws IOException,
                           ParseException,
                           EOFException
Description copied from interface: AuditEventReader
This method tries to read the next event that is available.

Specified by:
readNext in interface AuditEventReader
Overrides:
readNext in class SyslogAuditEventStream
Returns:
The next audit-event from or NULL if no event is available.
Throws:
IOException
ParseException
EOFException
See Also:
AuditEventReader.readNext()

getBuffers

public StringBuffer[] getBuffers(String key)

initBuffers

public StringBuffer[] initBuffers(String key)

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class SyslogAuditEventStream

iterator

public Iterator<AuditEvent> iterator()
Specified by:
iterator in interface Iterable<AuditEvent>
Overrides:
iterator in class SyslogAuditEventStream


Copyright © 2012 jwall.org. All Rights Reserved.