Interface IEventMatcher<T>

Type Parameters:
T - event type
All Known Implementing Classes:
ImplementsEventMatcher

public interface IEventMatcher<T>
Interface for event matchers used in the dynamic event dispatcher.
Since:
1.15
Author:
Reiner Jung
  • 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.
  • Method Details

    • setOutputPort

      void setOutputPort​(teetime.framework.OutputPort<T> outputPort)
      Register an event matcher.
      Parameters:
      outputPort - an output port for the event matcher
    • matchEvent

      <R> boolean matchEvent​(R event)
      Check whether the event should be send to a specific output port.
      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
    • getNextMatcher

      IEventMatcher<? extends java.lang.Object> getNextMatcher()
      Return the next matcher.
      Returns:
      return the matcher
    • getOutputPort

      teetime.framework.OutputPort<T> getOutputPort()
      Provide the corresponding output port.
      Returns:
      the output port of this matcher
    • setNextMatcher

      void setNextMatcher​(IEventMatcher<? extends java.lang.Object> leaveEventMatcher)
      Set a new following matcher.
      Parameters:
      leaveEventMatcher - one matcher or a chain of matchers