kieker.analysis.reader.namedRecordPipe
Class PipeReader
java.lang.Object
kieker.analysis.reader.AbstractMonitoringReader
kieker.analysis.reader.namedRecordPipe.PipeReader
- All Implemented Interfaces:
- IMonitoringReader, IPipeReader, IMonitoringRecordReceiver
public final class PipeReader
- extends AbstractMonitoringReader
- implements IPipeReader
- Author:
- Andre van Hoorn
Method Summary |
boolean |
init(String initString)
Initialize instance from passed initialization string which is typically
a list of separated parameter/values pairs. |
boolean |
newMonitoringRecord(IMonitoringRecord rec)
Called for each new record. |
void |
notifyPipeClosed()
Called to notify the reader that the pipe is closed. |
boolean |
read()
Blocks until the associated pipe is being closed. |
void |
terminate()
Initiates a termination of the reader. |
PROPERTY_PIPE_NAME
public static final String PROPERTY_PIPE_NAME
- See Also:
- Constant Field Values
PipeReader
public PipeReader()
PipeReader
public PipeReader(String pipeName)
read
public boolean read()
- Blocks until the associated pipe is being closed.
- Specified by:
read
in interface IMonitoringReader
- Returns:
- true if reading was successful; false if an error occurred
init
public boolean init(String initString)
- Description copied from interface:
IMonitoringReader
- Initialize instance from passed initialization string which is typically
a list of separated parameter/values pairs. The implementing class
AbstractMonitoringReader
includes convenient methods to extract
configuration values from an initString.
- Specified by:
init
in interface IMonitoringReader
- Parameters:
initString
- the initialization string
- Returns:
- true if the initialization was successful; false if an error occurred
newMonitoringRecord
public boolean newMonitoringRecord(IMonitoringRecord rec)
- Description copied from interface:
IMonitoringRecordReceiver
- Called for each new record.
Notice, that this method should not throw an exception,
but indicate an error by the return value false.
- Specified by:
newMonitoringRecord
in interface IMonitoringRecordReceiver
- Parameters:
rec
- the record.
- Returns:
- true on success; false in case of an error.
notifyPipeClosed
public void notifyPipeClosed()
- Description copied from interface:
IPipeReader
- Called to notify the reader that the pipe is closed.
- Specified by:
notifyPipeClosed
in interface IPipeReader
terminate
public void terminate()
- Description copied from interface:
IMonitoringReader
- Initiates a termination of the reader. This method is only used by the
framework and should not be called manually to register a receiver. Use
the method
AnalysisController.terminate()
instead.
After receiving this notification,
the reader should terminate its IMonitoringReader.read()
method.
- Specified by:
terminate
in interface IMonitoringReader
Copyright 2011 the Kieker Project, http://kieker.sourceforge.net>