Package kieker.analysis.generic
Class ImplementsEventMatcher<T>
java.lang.Object
kieker.analysis.generic.ImplementsEventMatcher<T>
- Type Parameters:
T- match class
- All Implemented Interfaces:
IEventMatcher<T>
public class ImplementsEventMatcher<T> extends java.lang.Object implements IEventMatcher<T>
Match the events by implementing interface.
- Since:
- 1.15
- Author:
- Reiner Jung
-
Constructor Summary
Constructors Constructor Description ImplementsEventMatcher(java.lang.Class<T> type, IEventMatcher<? extends java.lang.Object> successor)Create an event matcher to match events for a specific interface. -
Method Summary
Modifier and Type Method Description IEventMatcher<? extends java.lang.Object>getNextMatcher()Return the next matcher.teetime.framework.OutputPort<T>getOutputPort()Provide the corresponding output port.<R> booleanmatchEvent(R event)Check whether the event should be send to a specific output port.voidsetNextMatcher(IEventMatcher<? extends java.lang.Object> leaveEventMatcher)Set a new following matcher.voidsetOutputPort(teetime.framework.OutputPort<T> outputPort)Register an event matcher.
-
Constructor Details
-
ImplementsEventMatcher
public ImplementsEventMatcher(java.lang.Class<T> type, IEventMatcher<? extends java.lang.Object> successor)Create an event matcher to match events for a specific interface.- Parameters:
type- the class type to be matchedsuccessor- next matcher to use in case this one does not match
-
-
Method Details
-
matchEvent
public <R> boolean matchEvent(R event)Description copied from interface:IEventMatcherCheck whether the event should be send to a specific output port.- Specified by:
matchEventin interfaceIEventMatcher<T>- Type Parameters:
R- a sub type of- Parameters:
event- event to be evaluated- Returns:
- true if the even must be send to the corresponding output port
-
getOutputPort
Description copied from interface:IEventMatcherProvide the corresponding output port.- Specified by:
getOutputPortin interfaceIEventMatcher<T>- Returns:
- the output port of this matcher
-
setOutputPort
Description copied from interface:IEventMatcherRegister an event matcher.- Specified by:
setOutputPortin interfaceIEventMatcher<T>- Parameters:
outputPort- an output port for the event matcher
-
getNextMatcher
Description copied from interface:IEventMatcherReturn the next matcher.- Specified by:
getNextMatcherin interfaceIEventMatcher<T>- Returns:
- return the matcher
-
setNextMatcher
Description copied from interface:IEventMatcherSet a new following matcher.- Specified by:
setNextMatcherin interfaceIEventMatcher<T>- Parameters:
leaveEventMatcher- one matcher or a chain of matchers
-