Class PipeReader
java.lang.Object
teetime.framework.AbstractStage
teetime.framework.AbstractProducerStage<IMonitoringRecord>
kieker.analysis.generic.source.namedpipe.PipeReader
- All Implemented Interfaces:
IPipeReader
public class PipeReader extends teetime.framework.AbstractProducerStage<IMonitoringRecord> implements IPipeReader
This reader can be used to read records via an in-memory pipe.
- Since:
- 1.3
- Author:
- Andre van Hoorn, Lars Bluemke
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PipeReader(java.lang.String pipeName)
Creates a new instance of this class using the given parameters. -
Method Summary
Modifier and Type Method Description protected void
execute()
Blocks until the associated pipe is being closed.boolean
newMonitoringRecord(IMonitoringRecord rec)
This method sends a given records directly to the output port.void
notifyPipeClosed()
Called to notify the reader that the pipe is closed.Methods inherited from class teetime.framework.AbstractProducerStage
getOutputPort, getTerminationStrategy
Methods inherited from class teetime.framework.AbstractStage
abort, addInputPortRemovedListener, addOutputPortRemovedListener, compareAndSetBeingExecuted, createInputPort, createInputPort, createInputPort, createInputPort, createOutputPort, createOutputPort, createOutputPort, createOutputPort, declareActive, declarePassive, executeByFramework, getCurrentState, getId, getInputPorts, getOutputPorts, getOwningThread, isActive, isBeingExecuted, isPaused, isProducer, isStateless, onSignal, onStarting, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
-
Constructor Details
-
PipeReader
public PipeReader(java.lang.String pipeName)Creates a new instance of this class using the given parameters.- Parameters:
pipeName
- name of the pipe
-
-
Method Details
-
execute
protected void execute()Blocks until the associated pipe is being closed.- Specified by:
execute
in classteetime.framework.AbstractStage
-
newMonitoringRecord
This method sends a given records directly to the output port.- Specified by:
newMonitoringRecord
in interfaceIPipeReader
- Parameters:
rec
- The new record object.- Returns:
- true if and only if the record has been delivered.
-
notifyPipeClosed
public void notifyPipeClosed()Called to notify the reader that the pipe is closed.- Specified by:
notifyPipeClosed
in interfaceIPipeReader
-