|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEmxEvent
Root interface for all dispatcher events.
This interface serves as the root interface for the various event types
dispatched by the dispatcher. See IEmxDispatcher
for more
information on events and how they relate to the dispatcher.
Event objects are cloenable objects. Therefore, implementations of this and subinterfaces must implement the cloneable interface.
Nested Class Summary | |
---|---|
static class |
IEmxEvent.EventType
Enumerates the supported event types |
Field Summary | |
---|---|
static byte |
MAXIMUM_EVENT_PRIORITY
Specifies the maximum event priority |
static byte |
MINIMUM_EVENT_PRIORITY
Specifies the minimum event priority |
static byte |
NORMAL_EVENT_PRIORITY
Specifies the default event priority |
Method Summary | |
---|---|
Object |
getAttachment()
Get a user attachment. |
IEmxDispatcher |
getDispatcher()
Get the event dispatcher. |
IEmxEventHandler |
getHandler()
Get the event handler. |
long |
getLatency()
Get the event latency. |
int |
getPriority()
Get the event priority. |
IEmxEvent.EventType |
getType()
Get the event type. |
IEmxEvent |
setAttachment(Object attachment)
Set a user attachment. |
IEmxEvent |
setHandler(IEmxEventHandler handler)
Set the event handler. |
IEmxEvent |
setPriority(int priority)
Set the event priority. |
Field Detail |
---|
static final byte MINIMUM_EVENT_PRIORITY
static final byte MAXIMUM_EVENT_PRIORITY
static final byte NORMAL_EVENT_PRIORITY
Method Detail |
---|
IEmxEvent.EventType getType()
IEmxEvent setPriority(int priority)
IllegalArgumentException
- Thrown in case the priority is
less than MINIMUM_EVENT_PRIORITY
or greater than
MAXIMUM_EVENT_PRIORITY
.
IllegalStateException
- Thrown in case the event is currently
being scheduled by a dispatcher. It is illegal to change the priority
of an event while it is owned by the dispatcher.getPriority()
int getPriority()
IEmxEvent setHandler(IEmxEventHandler handler)
IllegalStateException
- Thrown in case the event is currently
being scheduled by a dispatcher. It is illegal to change the handler
of an event while it is owned by the dispatcher.getHandler()
IEmxEventHandler getHandler()
IEmxDispatcher getDispatcher()
This method returns the dispatcher that is currently handling this event. The user can use this method to determine whether an event is active with a dispatcher. The dispatcher will reset the attached dispatcher to null before dispatching the event to the user.
long getLatency()
This method returns the latency of the event in the dispatcher i.e. the time (in nanoseconds) between when the event was scheduled with and subsequently dispatched by the dispatcher.
IEmxEvent setAttachment(Object attachment)
attachment
- The attachment to set
This method attaches a user object to an event. This object is opaque to the event.
Object getAttachment()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |