|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
org.jboss.remoting.callback.CallbackPoller
public class CallbackPoller
CallbackPoller is used to simulate push callbacks on transports that don't support bidirectional connections. It will periodically pull callbacks from the server and pass them to the InvokerCallbackHandler.
Field Summary | |
---|---|
static java.lang.String |
CALLBACK_POLL_PERIOD
The key value to use to specify the desired poll period within the metadata Map. |
static java.lang.String |
CALLBACK_SCHEDULE_MODE
The key value to use in metadata Map to specify the desired scheduling mode. |
static int |
DEFAULT_BLOCKING_TIMEOUT
Default timeout for getting callbacks in blocking mode. |
static int |
DEFAULT_MAX_ERROR_COUNT
Default number of exceptions before callback polling wil be shut down. |
static long |
DEFAULT_POLL_PERIOD
Default polling period for getting callbacks from the server. |
static java.lang.String |
MAX_ERROR_COUNT
The key to use to specify the number of errors before callback polling will be shut down. |
static java.lang.String |
REPORT_STATISTICS
The key to use in metadata Map to request statistics. |
static java.lang.String |
SCHEDULE_FIXED_DELAY
Use java.util.timer.scheduleAtFixedRate(). |
static java.lang.String |
SCHEDULE_FIXED_RATE
Use java.util.timer.schedule(). |
static java.lang.String |
SYNCHRONIZED_SHUTDOWN
The key value to use to specify if stop() should wait for the call to org.jboss.remoting.Client.getCallbacks() should return. |
Constructor Summary | |
---|---|
CallbackPoller(Client client,
InvokerCallbackHandler callbackhandler,
java.util.Map metadata,
java.lang.Object callbackHandlerObject)
|
Method Summary | |
---|---|
void |
run()
|
void |
start()
|
void |
stop()
|
void |
stop(int timeout)
stop() will not return until all received callbacks have been processed by the CallbackHandler and acknowledgements have been sent for all callbacks for which acknowledgements have been requested. |
Methods inherited from class java.util.TimerTask |
---|
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_POLL_PERIOD
public static final int DEFAULT_BLOCKING_TIMEOUT
public static final int DEFAULT_MAX_ERROR_COUNT
public static final java.lang.String SYNCHRONIZED_SHUTDOWN
public static final java.lang.String CALLBACK_POLL_PERIOD
public static final java.lang.String SCHEDULE_FIXED_RATE
public static final java.lang.String SCHEDULE_FIXED_DELAY
public static final java.lang.String MAX_ERROR_COUNT
public static final java.lang.String REPORT_STATISTICS
public static final java.lang.String CALLBACK_SCHEDULE_MODE
Constructor Detail |
---|
public CallbackPoller(Client client, InvokerCallbackHandler callbackhandler, java.util.Map metadata, java.lang.Object callbackHandlerObject)
Method Detail |
---|
public void start() throws java.lang.Exception
java.lang.Exception
public void run()
run
in interface java.lang.Runnable
run
in class java.util.TimerTask
public void stop()
public void stop(int timeout)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |