|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.client.scopetest.SupportUpdateListener
public class SupportUpdateListener
Update listener that retains the events it receives for use in assertions.
Constructor Summary | |
---|---|
SupportUpdateListener()
Ctor. |
Method Summary | |
---|---|
UniformPair<EventBean[]> |
assertInvokedAndReset()
Returns a pair of insert and remove stream event arrays considering the last invocation only, asserting that only a single invocation occured, and resetting the listener. |
EventBean |
assertOneGetNew()
Asserts that exactly one insert stream event was received not checking remove stream data, and returns the received event. |
EventBean |
assertOneGetNewAndReset()
Asserts that exactly one insert stream event was received and no remove stream events, resets the listener clearing all state and returns the received event. |
EventBean |
assertOneGetOld()
Asserts that exactly one remove stream event was received not checking insert stream data, and returns the received event. |
EventBean |
assertOneGetOldAndReset()
Asserts that exactly one remove stream event was received and no insert stream events, resets the listener clearing all state and returns the received event. |
UniformPair<EventBean> |
assertPairGetIRAndReset()
Asserts that exactly one insert stream event and exactly one remove stream event was received, resets the listener clearing all state and returns the received events as a pair. |
boolean |
getAndClearIsInvoked()
Returns true if the listener was invoked at least once and clears the invocation flag. |
UniformPair<EventBean[]> |
getAndResetDataListsFlattened()
Returns a pair of insert and remove stream event arrays considering the all invocations, and resets the listener. |
EventBean[] |
getAndResetLastNewData()
Returns the last array of events (insert stream) that were received and resets the listener. |
EventBean[] |
getAndResetLastOldData()
Returns the last array of events (insert stream) that were received and resets the listener. |
UniformPair<EventBean[]> |
getDataListsFlattened()
Returns a pair of insert and remove stream event arrays considering the all invocations. |
boolean |
getIsInvokedAndReset()
Returns true if the listener was invoked at least once and clears the invocation flag. |
EventBean[] |
getLastNewData()
Returns the last array of events (insert stream) that were received. |
EventBean[] |
getLastOldData()
Returns the last array of remove-stream events that were received. |
java.util.List<EventBean[]> |
getNewDataList()
Get a list of all insert-stream event arrays received. |
EventBean[] |
getNewDataListFlattened()
Returns an event array that represents all insert-stream events received so far. |
java.util.List<EventBean[]> |
getOldDataList()
Get a list of all remove-stream event arrays received. |
EventBean[] |
getOldDataListFlattened()
Returns an event array that represents all remove-stream events received so far. |
boolean |
isInvoked()
Returns true if the listener was invoked at least once. |
void |
reset()
Reset listener, clearing all associated state. |
void |
setLastNewData(EventBean[] lastNewData)
Set an array of events as the last insert-stream events received. |
void |
setLastOldData(EventBean[] lastOldData)
Set an array of events as the last remove-stream events received. |
void |
update(EventBean[] newData,
EventBean[] oldData)
Notify that new events are available or old events are removed. |
void |
waitForInvocation(long msecWait)
Wait for the listener invocation for up to the given number of milliseconds. |
void |
waitForInvocation(long msecWait,
int numberOfNewEvents)
Wait for the listener invocation for up to the given number of milliseconds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SupportUpdateListener()
Method Detail |
---|
public void waitForInvocation(long msecWait)
msecWait
- to wait
java.lang.RuntimeException
- when no results were receivedpublic void waitForInvocation(long msecWait, int numberOfNewEvents)
msecWait
- to waitnumberOfNewEvents
- in any number of separate invocations required before returning
java.lang.RuntimeException
- when no results or insufficient number of events were receivedpublic void update(EventBean[] newData, EventBean[] oldData)
UpdateListener
update
in interface UpdateListener
newData
- is any new events. This will be null or empty if the update is for old events only.oldData
- is any old events. This will be null or empty if the update is for new events only.public void reset()
public EventBean[] getLastNewData()
public EventBean[] getLastOldData()
public EventBean[] getAndResetLastNewData()
public EventBean[] getAndResetLastOldData()
public EventBean assertOneGetNewAndReset()
public EventBean assertOneGetOldAndReset()
public UniformPair<EventBean> assertPairGetIRAndReset()
public EventBean assertOneGetNew()
public EventBean assertOneGetOld()
public java.util.List<EventBean[]> getNewDataList()
public java.util.List<EventBean[]> getOldDataList()
public boolean isInvoked()
public boolean getAndClearIsInvoked()
public boolean getIsInvokedAndReset()
public void setLastNewData(EventBean[] lastNewData)
lastNewData
- to storepublic void setLastOldData(EventBean[] lastOldData)
lastOldData
- to storepublic EventBean[] getNewDataListFlattened()
public EventBean[] getOldDataListFlattened()
public UniformPair<EventBean[]> assertInvokedAndReset()
public UniformPair<EventBean[]> getDataListsFlattened()
public UniformPair<EventBean[]> getAndResetDataListsFlattened()
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |