public class EventAnticipator extends Object implements EventListener
Constructor and Description |
---|
EventAnticipator() |
Modifier and Type | Method and Description |
---|---|
void |
anticipateEvent(Event event) |
void |
anticipateEvent(Event event,
boolean checkUnanticipatedList) |
void |
eventProcessed(Event event) |
void |
eventReceived(Event event) |
List<Event> |
getAnticipatedEvents() |
List<Event> |
getAnticipatedEventsReceived() |
String |
getName()
Return the id of the listener
|
List<Event> |
getUnanticipatedEvents() |
boolean |
isDiscardUnanticipated() |
void |
onEvent(IEvent e)
Process a sent event.
|
void |
reset() |
void |
resetAnticipated() |
void |
resetUnanticipated() |
void |
setDiscardUnanticipated(boolean discardUnanticipated) |
void |
verifyAnticipated() |
void |
verifyAnticipated(long wait,
long sleepMiddle,
long sleepAfter,
int anticipatedSize,
int unanticipatedSize) |
Collection<Event> |
waitForAnticipated(long millis) |
public boolean isDiscardUnanticipated()
public void setDiscardUnanticipated(boolean discardUnanticipated)
discardUnanticipated
- the discardUnanticipated to setpublic void anticipateEvent(Event event)
event
- public void anticipateEvent(Event event, boolean checkUnanticipatedList)
public void eventReceived(Event event)
event
- public void reset()
public void resetUnanticipated()
public void resetAnticipated()
public Collection<Event> waitForAnticipated(long millis)
i
- public void eventProcessed(Event event)
event
- public void verifyAnticipated(long wait, long sleepMiddle, long sleepAfter, int anticipatedSize, int unanticipatedSize)
public void verifyAnticipated()
public String getName()
EventListener
getName
in interface EventListener
String
object.public void onEvent(IEvent e)
EventListener
onEvent
in interface EventListener
e
- a IEvent
object.Copyright © 2021. All rights reserved.