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(Event 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()
EventListenergetName in interface EventListenerString object.public void onEvent(Event e)
EventListeneronEvent in interface EventListenere - a Event object.Copyright © 2020. All rights reserved.