Package kieker.analysis.generic
Class TeeFilter
java.lang.Object
teetime.framework.AbstractStage
teetime.framework.AbstractConsumerStage<I>
teetime.stage.basic.AbstractTransformation<E,E>
teetime.stage.basic.AbstractFilter<java.lang.Object>
kieker.analysis.generic.TeeFilter
- All Implemented Interfaces:
teetime.stage.basic.ITransformation<java.lang.Object,java.lang.Object>
public class TeeFilter
extends teetime.stage.basic.AbstractFilter<java.lang.Object>
This filter has exactly one input port and one output port.
A simple message is printed to a configurable stream and all objects are forwarded to the output port.
- Since:
- 1.2
- Author:
- Matthias Rohr, Jan Waller, Lars Bluemke
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTeeFilter.TeeFilterStreamTypePredefined types of streams for theTeeFilter.
STDLOG = standard log
STDOUT = standard output
STDERR = standard error output
NULL = filter doesn't print anything -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_ENCODINGThe default value of the encoding property which determines that the filter uses utf-8.static booleanDEFAULT_STREAM_APPENDThe default value of the stream property which determines that the filter appends or overwrites a file. -
Constructor Summary
Constructors Constructor Description TeeFilter(java.lang.String fileName, java.lang.String encoding, boolean append)Creates a new instance of this class using the given parameters.TeeFilter(TeeFilter.TeeFilterStreamType streamType, java.lang.String encoding)Creates a new instance of this class using the given parameters. -
Method Summary
Modifier and Type Method Description protected voidexecute(java.lang.Object object)This method receives incoming objects from the filter's input port.java.lang.StringgetPrintStreamName()protected voidonTerminating()Methods inherited from class teetime.framework.AbstractConsumerStage
createInputPort, execute, getInputPortMethods inherited from class teetime.framework.AbstractStage
abort, addInputPortRemovedListener, addOutputPortRemovedListener, compareAndSetBeingExecuted, createInputPort, createInputPort, createInputPort, createOutputPort, createOutputPort, createOutputPort, createOutputPort, declareActive, declarePassive, executeByFramework, getCurrentState, getId, getInputPorts, getOutputPorts, getOwningThread, getTerminationStrategy, isActive, isBeingExecuted, isPaused, isProducer, isStateless, onSignal, onStarting, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
-
Field Details
-
DEFAULT_ENCODING
public static final java.lang.String DEFAULT_ENCODINGThe default value of the encoding property which determines that the filter uses utf-8.- See Also:
- Constant Field Values
-
DEFAULT_STREAM_APPEND
public static final boolean DEFAULT_STREAM_APPENDThe default value of the stream property which determines that the filter appends or overwrites a file.- See Also:
- Constant Field Values
-
-
Constructor Details
-
TeeFilter
Creates a new instance of this class using the given parameters. Uses one of the predefinedTeeFilter.TeeFilterStreamTypes.- Parameters:
streamType- Determines which of the predefinedTeeFilter.TeeFilterStreamTypes the filter uses.encoding- Determines which encoding the filter uses. Pass null for default encoding "UTF-8".
-
TeeFilter
public TeeFilter(java.lang.String fileName, java.lang.String encoding, boolean append)Creates a new instance of this class using the given parameters. Uses aFileOutputStream.- Parameters:
fileName- The system dependent file name for theFileOutputStream.encoding- Determines which encoding the filter uses. Pass null for default encoding "UTF-8".append- Determines whether the filter appends or overwrites a file.
-
-
Method Details
-
onTerminating
protected void onTerminating()- Overrides:
onTerminatingin classteetime.framework.AbstractStage
-
execute
protected void execute(java.lang.Object object)This method receives incoming objects from the filter's input port. Every object will be printed into a stream (based on the configuration) before the filter sends it to the output port.- Specified by:
executein classteetime.framework.AbstractConsumerStage<java.lang.Object>- Parameters:
object- The new object.
-
getPrintStreamName
public java.lang.String getPrintStreamName()
-