org.jwall.web.audit.net
Class SyslogAuditEventStream
java.lang.Object
org.jwall.web.audit.io.AbstractAuditEventReader
org.jwall.web.audit.net.SyslogAuditEventStream
- All Implemented Interfaces:
- Iterable<AuditEvent>, Runnable, AuditEventReader
- Direct Known Subclasses:
- SyslogAuditEventMultiStream
public class SyslogAuditEventStream
- extends AbstractAuditEventReader
- 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>
SyslogAuditEventStream
public SyslogAuditEventStream(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.
SyslogAuditEventStream
public SyslogAuditEventStream(InputStream in,
AuditEventListener listener,
boolean persist)
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.
SyslogAuditEventStream
public SyslogAuditEventStream(FileReader reader,
AuditEventListener listener,
boolean tail)
SyslogAuditEventStream
public SyslogAuditEventStream(File file,
AuditEventListener l)
throws IOException
- Throws:
IOException
SyslogAuditEventStream
public SyslogAuditEventStream(File file,
AuditEventListener l,
boolean autoRemove)
throws IOException
- Throws:
IOException
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- Specified by:
readNext in class AbstractAuditEventReader
- Returns:
- The next audit-event from or
NULL if no event is available.
- Throws:
IOException
ParseException
EOFException- See Also:
AuditEventReader.readNext()
run
public void run()
- Specified by:
run in interface Runnable
iterator
public Iterator<AuditEvent> iterator()
- Specified by:
iterator in interface Iterable<AuditEvent>
Copyright © 2012 jwall.org. All Rights Reserved.