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 |
Pipe |
getPipe()
Returns the pipe from which the reader receives its monitoring records. |
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. |
PROPERTY_PIPE_NAME
public static final String PROPERTY_PIPE_NAME
- See Also:
- Constant Field Values
PipeReader
public PipeReader()
PipeReader
public PipeReader(String pipeName)
getPipe
public Pipe getPipe()
- Returns the pipe from which the reader receives its monitoring records.
One reason to require the pipe is to close it by a call to
Pipe#close()
.
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
AbstractMonitoringLogWriter 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
Copyright 2011 the Kieker Project, http://kieker.sourceforge.net>