Class EventAnticipator

  • All Implemented Interfaces:
    EventListener

    public class EventAnticipator
    extends java.lang.Object
    implements EventListener
    Author:
    brozow
    • Constructor Detail

      • EventAnticipator

        public EventAnticipator()
    • Method Detail

      • isDiscardUnanticipated

        public boolean isDiscardUnanticipated()
        Returns:
        the discardUnanticipated
      • setDiscardUnanticipated

        public void setDiscardUnanticipated​(boolean discardUnanticipated)
        Parameters:
        discardUnanticipated - the discardUnanticipated to set
      • anticipateEvent

        public void anticipateEvent​(Event event)
        Parameters:
        event -
      • anticipateEvent

        public void anticipateEvent​(Event event,
                                    boolean checkUnanticipatedList)
      • eventReceived

        public void eventReceived​(Event event)
        Parameters:
        event -
      • getAnticipatedEvents

        public java.util.List<Event> getAnticipatedEvents()
      • getAnticipatedEventsReceived

        public java.util.List<Event> getAnticipatedEventsReceived()
      • getUnanticipatedEvents

        public java.util.List<Event> getUnanticipatedEvents()
        Returns:
      • reset

        public void reset()
      • resetUnanticipated

        public void resetUnanticipated()
      • resetAnticipated

        public void resetAnticipated()
      • waitForAnticipated

        public java.util.Collection<Event> waitForAnticipated​(long millis)
        Parameters:
        i -
        Returns:
      • eventProcessed

        public void eventProcessed​(Event event)
        Parameters:
        event -
      • verifyAnticipated

        public void verifyAnticipated​(long wait,
                                      long sleepMiddle,
                                      long sleepAfter,
                                      int anticipatedSize,
                                      int unanticipatedSize)
      • verifyAnticipated

        public void verifyAnticipated()
      • getName

        public java.lang.String getName()
        Description copied from interface: EventListener
        Return the id of the listener
        Specified by:
        getName in interface EventListener
        Returns:
        a String object.