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> boolean
matchEvent(R event)
Check whether the event should be send to a specific output port.void
setNextMatcher(IEventMatcher<? extends java.lang.Object> leaveEventMatcher)
Set a new following matcher.void
setOutputPort(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:IEventMatcher
Check whether the event should be send to a specific output port.- Specified by:
matchEvent
in 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:IEventMatcher
Provide the corresponding output port.- Specified by:
getOutputPort
in interfaceIEventMatcher<T>
- Returns:
- the output port of this matcher
-
setOutputPort
Description copied from interface:IEventMatcher
Register an event matcher.- Specified by:
setOutputPort
in interfaceIEventMatcher<T>
- Parameters:
outputPort
- an output port for the event matcher
-
getNextMatcher
Description copied from interface:IEventMatcher
Return the next matcher.- Specified by:
getNextMatcher
in interfaceIEventMatcher<T>
- Returns:
- return the matcher
-
setNextMatcher
Description copied from interface:IEventMatcher
Set a new following matcher.- Specified by:
setNextMatcher
in interfaceIEventMatcher<T>
- Parameters:
leaveEventMatcher
- one matcher or a chain of matchers
-