|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jwall.web.audit.io.AbstractAuditEventReader
org.jwall.web.audit.io.AccessLogAuditReader
public class AccessLogAuditReader
This simple class creates small AuditEvent objects from a line of an web-server access log. The resulting events are not complete, i.e. they do not include the complete header.
| Field Summary |
|---|
| Fields inherited from class org.jwall.web.audit.io.AbstractAuditEventReader |
|---|
DEFAULT_AUDIT_EVENT_FACTORY_CLASS |
| Constructor Summary | |
|---|---|
AccessLogAuditReader(File accessLogFile)
This creates an instance of this class that reads from the given file accessLogFile. |
|
AccessLogAuditReader(File accessLogFile,
boolean tail)
This creates an instance of this class that reads from the given file accessLogFile. |
|
AccessLogAuditReader(InputStream in)
|
|
| Method Summary | |
|---|---|
static AuditEvent |
createEvent(String accessLine)
This method create an audit-event from the given access-line. |
Iterator<AuditEvent> |
iterator()
|
AuditEvent |
readNext()
This method reads the next line from the underlying file and creates an AuditEvent-object from it. |
static String[] |
splitAccessLine(String input)
This method splits the given line into tokens. |
| 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 |
| Constructor Detail |
|---|
public AccessLogAuditReader(File accessLogFile,
boolean tail)
throws IOException
accessLogFile.
accessLogFile - The file to read events from.
IOException - In case a reader on this file cannot be created.
public AccessLogAuditReader(File accessLogFile)
throws IOException
accessLogFile.
accessLogFile - The file to read events from.
IOException - In case a reader on this file cannot be created.public AccessLogAuditReader(InputStream in)
| Method Detail |
|---|
public AuditEvent readNext()
readNext in interface AuditEventReaderreadNext in class AbstractAuditEventReaderNULL if no event is available.AuditEventReader.readNext()public static String[] splitAccessLine(String input)
input - The string to be split into parts.
public static AuditEvent createEvent(String accessLine)
throws Exception
accessLine - The line to create the event from.
Exception - In case anything goes wrong ;-)public Iterator<AuditEvent> iterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||