|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEventMultiplexer
Represents an event multiplexer.
An event multiplexer is responsible for multiplexing events arriving on the event sources' execution lines (threads) onto a single dispatch execution line (thread).
Nested Class Summary | |
---|---|
static class |
IEventMultiplexer.State
Enumerates a multiplexer state |
Field Summary | |
---|---|
static int |
NON_BLOCKING
Flag used with onEvent(Event, int) to indicate that
the calling thread cannot be blocked. |
Method Summary | |
---|---|
void |
close()
Close a multiplexer. |
String |
getName()
Get an event multiplexer's name. |
IEventMultiplexerStats |
getStats()
Get an event multiplexer's statistics object. |
void |
multiplexEvent(Event event,
int flags)
Multiplex an event into one of the multiplexer's threads. |
void |
onEvent(Event event,
int flags)
Deprecated. |
void |
open()
Open a multiplexer. |
int |
scheduledEventCount()
Get the number of events scheduled for dispatch with a multiplexer |
void |
scheduleEvent(Event event)
Schedule an event for dispatch at a later point in time. |
void |
setAllEventDispatch(boolean val)
Configure the multiplexer to dispatch all events including internal events This method controls whether the multiplexer dispatches all events, including internal ones, to the user. |
void |
unscheduleEvent(Event event)
Unschedule a scheduled event. |
Methods inherited from interface com.neeve.event.IEventHandler |
---|
onEvent |
Field Detail |
---|
static final int NON_BLOCKING
onEvent(Event, int)
to indicate that
the calling thread cannot be blocked.
Method Detail |
---|
void open()
This method opens a multiplexer inbound event gates i.e. received events will be returned with exception until this method is invoked successfully.
This method can only be invoked on a multiplexer in the initialized state.
String getName()
IEventMultiplexerStats getStats()
void setAllEventDispatch(boolean val)
This method controls whether the multiplexer dispatches all events, including internal ones, to the user. Dispatch of all events should be enabled if the user is processing the EOB flag on events.
@Deprecated void onEvent(Event event, int flags)
event
- The event to multiplexflags
- Flags that qualify the multiplexing
Note: This method has been deprectaed in favor of the
multiplexEvent(com.neeve.event.Event, int)
void multiplexEvent(Event event, int flags)
event
- The event to multiplexflags
- Flags that qualify the multiplexingvoid scheduleEvent(Event event)
event
- The event to schedulevoid unscheduleEvent(Event event)
event
- The event to unscheduleint scheduledEventCount()
void close()
This method closes a multiplexer's input gates i.e. upon return from this method, any events fed into the multiplexer will throw an exception and any attempt to schedule an event will fail with an exception.
This method can only be invoked on a multiplexer in any state. Invoking the method in the initialized or closed state is a no-op (except for a state transition to closed).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |