|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jalore.regexp.RegexpLogReader
public class RegexpLogReader
Implementation of LogReader to read a log using a regular expression.
| Constructor Summary | |
|---|---|
RegexpLogReader(java.io.Reader reader,
java.lang.String pattern,
java.util.Map<java.lang.String,java.lang.Integer> propertyToGroup)
Constructs a RegexpLogReader. |
|
| Method Summary | |
|---|---|
boolean |
hasMoreMessages()
Tests if this reader contains more log messages. |
LogMessage |
nextMessage()
Returns the next log message of this reader or null if no more message is available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegexpLogReader(java.io.Reader reader,
java.lang.String pattern,
java.util.Map<java.lang.String,java.lang.Integer> propertyToGroup)
throws java.io.IOException
The given pattern must only describe the first line of messages or a part of the first line. The regular expression groups are converted into message properties using the map propertyToGroup.
reader - the reader used to read the logpattern - regular expression pattern describing first line of messagespropertyToGroup - maps property names to group positions
java.io.IOException - if an error occurred while reading the log| Method Detail |
|---|
public boolean hasMoreMessages()
LogReader
hasMoreMessages in interface LogReadertrue if and only if this reader
contains at least one more log message to provide;
false otherwise.
public LogMessage nextMessage()
throws java.io.IOException
LogReader
nextMessage in interface LogReaderjava.io.IOException - if an error occurred while reading the next message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||