Kieker 1.3

kieker.analysis.reader.namedRecordPipe
Class PipeReader

java.lang.Object
  extended by kieker.analysis.reader.AbstractMonitoringReader
      extended by kieker.analysis.reader.namedRecordPipe.PipeReader
All Implemented Interfaces:
IMonitoringReader, IPipeReader, IMonitoringRecordReceiver

public final class PipeReader
extends AbstractMonitoringReader
implements IPipeReader

Author:
Andre van Hoorn

Field Summary
static String PROPERTY_PIPE_NAME
           
 
Constructor Summary
PipeReader()
           
PipeReader(String pipeName)
           
 
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.
 
Methods inherited from class kieker.analysis.reader.AbstractMonitoringReader
addRecordReceiver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_PIPE_NAME

public static final String PROPERTY_PIPE_NAME
See Also:
Constant Field Values
Constructor Detail

PipeReader

public PipeReader()

PipeReader

public PipeReader(String pipeName)
Method Detail

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

Kieker 1.3

Copyright 2011 the Kieker Project, http://kieker.sourceforge.net