|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.base.component.bus.event.WaitForEvent
public class WaitForEvent
Allows you to wait for some event on the bus.
WARNING: if you want to stop using this object (throw away the pointer) call DESTROY(), you will usually use try{}finally{} for this.
| Nested Class Summary | |
|---|---|
static interface |
WaitForEvent.IEventFilter<T>
Note that only events that implements IComponentEvent may be really substitued as T. |
| Constructor Summary | |
|---|---|
WaitForEvent(IComponentBus bus,
WaitForEvent.IEventFilter accept)
|
|
| Method Summary | |
|---|---|
boolean |
await()
Awaits the event (forever) ... do not use! |
boolean |
await(long timeoutMillis)
Awaits the event for a specific amount of time. |
void |
destroy()
Destroys the object ... any await() call will just go through after this call. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WaitForEvent(IComponentBus bus,
WaitForEvent.IEventFilter accept)
| Method Detail |
|---|
public boolean await()
throws cz.cuni.amis.utils.exception.PogamutInterruptedException
cz.cuni.amis.utils.exception.PogamutInterruptedException
public boolean await(long timeoutMillis)
throws cz.cuni.amis.utils.exception.PogamutInterruptedException
WARNING: If the event is not received and you do not plan to use the object further - call destroy()!
timeoutMillis -
InterruptedException
cz.cuni.amis.utils.exception.PogamutInterruptedExceptionpublic void destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||