public interface EdnJmsEventSubscriber extends Runnable
EdnJmsEventReader getEventReader() EdnJmsEventReader Methods are exposed to provide fine grained control over the EDN event consuming process, e.g.: start/stop the polling of events: startup() shutdown() temporarily switch on/off event delivery from the underlying JMS topic: deliveryOn() deliveryOff() In EDN Java Client API, this interface is not suppose to be implemented by client code directly, implementation is provided internally by the API framework, instance of EdnJmsEventSubscriber is created and returned as result of calling subscribe methods from EdnJmsConnection, see below: EdnJmsConnection.subscribeOnly(EdnSubscribeContext) EdnJmsConnection.subscribeOnly(javax.xml.namespace.QName, String) EdnJmsConnection.subscribeOnly(javax.xml.namespace.QName, oracle.fabric.blocks.event.ConsistencyLevel, oracle.fabric.blocks.event.XPathFilter, oracle.fabric.blocks.event.BusinessEventHandler, boolean, long, String)| Modifier and Type | Method and Description |
|---|---|
void |
deliveryOff()
Temporarily disable event delivery of underlying JMS TopicConnection, calling deliveryOn() will resume the suspended event delivery.
|
void |
deliveryOn()
Enable event delivery of underlying JMS TopicConnection, calling deliveryOn() when delivery is already on is ignored.
|
EdnJmsEventReader |
getEventReader()
Get the event reader associated with the subscriber.
|
boolean |
isRunning()
Check if the event receiving thread is running.
|
void |
setIsRunning(boolean b)
Set running state of the underlying event receiving thread.
|
void |
shutdown()
Stop the thread receiving event from underlying EDN JMS topic subscriber.
|
void |
startup()
Start the thread receiving (consuming) the event from underlying EDN JMS topic, the daemon nature of the event receiving thread inherits that of the creating thread.
|
void |
startup(boolean daemon)
Start the thread receiving event from underlying EDN JMS topic subscriber.
|
void |
waitOnReceiver()
Wait on the event receiving thread to complete (blocking the caller).
|
void |
waitOnReceiver(long threadJoinTimeout)
Wait on the event receiving thread to complete (blocking the caller) with a timeout.
|
void startup()
void startup(boolean daemon)
daemon - - flag indicating if the underlying thread is of daemon thread (true) or not (false)void shutdown()
void deliveryOn()
throws Exception
Exception - - when error occurs
void deliveryOff()
throws Exception
Exception - - when error occursEdnJmsEventReader getEventReader()
boolean isRunning()
void setIsRunning(boolean b)
b - - the flag indicates the running state of the underlying event receiving thread
void waitOnReceiver()
throws InterruptedException
InterruptedException - when the underlying event receiving thread is interrupted
void waitOnReceiver(long threadJoinTimeout)
throws InterruptedException
threadJoinTimeout - - the timeout (in millisecond) for joining the underlying event receiving threadInterruptedException - when the underlying event receiving thread is interrupted