Package kieker.analysis.generic
Class TypeFilter
java.lang.Object
teetime.framework.AbstractStage
teetime.framework.AbstractConsumerStage<java.lang.Object>
kieker.analysis.generic.TypeFilter
public class TypeFilter
extends teetime.framework.AbstractConsumerStage<java.lang.Object>
This filter has exactly one input port and one output port.
Please note that the @{link teetime.stage.InstanceOfFilter} provides similar functionality.
Only the specified objects are forwarded to the output port.
All other objects are forwarded to the output-not port.
- Since:
- 1.5
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TypeFilter(java.lang.Class<?>[] acceptedClasses)Creates a new instance of this class using the given parameters. -
Method Summary
Modifier and Type Method Description protected voidexecute(java.lang.Object event)This method represents the input port for the incoming objects.teetime.framework.OutputPort<java.lang.Object>getMatchingTypeOutputPort()Returns the output port where the incoming matching objects will be sent to.teetime.framework.OutputPort<java.lang.Object>getMismatchingTypeOutputPort()Returns the output port where the incoming objects will be sent to, which do not match the configured types.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, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
-
Constructor Details
-
TypeFilter
public TypeFilter(java.lang.Class<?>[] acceptedClasses)Creates a new instance of this class using the given parameters.- Parameters:
acceptedClasses- The types which will be accepted by the filter.
-
-
Method Details
-
execute
protected void execute(java.lang.Object event)This method represents the input port for the incoming objects.- Specified by:
executein classteetime.framework.AbstractConsumerStage<java.lang.Object>- Parameters:
event- The new incoming object.
-
getMatchingTypeOutputPort
public teetime.framework.OutputPort<java.lang.Object> getMatchingTypeOutputPort()Returns the output port where the incoming matching objects will be sent to.- Returns:
- matching type port
-
getMismatchingTypeOutputPort
public teetime.framework.OutputPort<java.lang.Object> getMismatchingTypeOutputPort()Returns the output port where the incoming objects will be sent to, which do not match the configured types.- Returns:
- mismatching type port
-