public class SyncEventDispatcherReactor extends Object implements IOReactor, JCSMPTimerQueue
| Modifier and Type | Method and Description |
|---|---|
void |
cancelAllTimers()
Cancel all scheduled timers.
|
void |
cancelTimer(JCSMPTimer timer)
Cancel a specific timer.
|
static SyncEventDispatcherReactor |
create(String name) |
void |
deregisterHandler(IOHandler handler,
int ops) |
void |
eventLoop() |
long |
getServiceThreadId()
Gets the TID of the reactor thread, this is useful, for example, if a
caller needs to know if it's on the reactor thread.
|
boolean |
isThreadReactor() |
void |
registerHandler(IOHandler handler,
int ops) |
void |
requestShutdown() |
JCSMPTimer |
schedule_absolute(long time,
JCSMPTimeoutHandler handler)
Schedule a timer for an absolute time in the future.
|
JCSMPTimer |
schedule_absolute(long time,
JCSMPTimeoutHandler handler,
JCSMPTimer timer) |
JCSMPTimer |
schedule_relative(long offset,
JCSMPTimeoutHandler handler)
Schedule a timer for a relative time in the future.
|
JCSMPTimer |
schedule_relative(long offset,
JCSMPTimeoutHandler handler,
JCSMPTimer timer) |
public void registerHandler(IOHandler handler, int ops)
registerHandler in interface IOReactorpublic void deregisterHandler(IOHandler handler, int ops)
deregisterHandler in interface IOReactorpublic void requestShutdown()
requestShutdown in interface IOReactorpublic static SyncEventDispatcherReactor create(String name)
public void eventLoop()
public void cancelTimer(JCSMPTimer timer)
JCSMPTimerQueuecancelTimer in interface JCSMPTimerQueuetimer - Timer to cancel.public void cancelAllTimers()
JCSMPTimerQueuecancelAllTimers in interface JCSMPTimerQueuepublic JCSMPTimer schedule_absolute(long time, JCSMPTimeoutHandler handler, JCSMPTimer timer)
schedule_absolute in interface JCSMPTimerQueuepublic JCSMPTimer schedule_relative(long offset, JCSMPTimeoutHandler handler, JCSMPTimer timer)
schedule_relative in interface JCSMPTimerQueuepublic JCSMPTimer schedule_absolute(long time, JCSMPTimeoutHandler handler)
JCSMPTimerQueueschedule_absolute in interface JCSMPTimerQueuetime - Absolute time at which the timer should expire (same format as
returned by System.currentTimeMillis()).handler - Implementation of the JCSMPTimeoutHandler interface,
to run on expiry.public JCSMPTimer schedule_relative(long offset, JCSMPTimeoutHandler handler)
JCSMPTimerQueueschedule_relative in interface JCSMPTimerQueueoffset - Relative time offset (milliseconds).handler - Implementation of the JCSMPTimeoutHandler interface,
to run on expiry.public long getServiceThreadId()
public boolean isThreadReactor()
Copyright 2004-2020 Solace Corporation. All rights reserved.