|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.genesyslab.omsdk.qil.applicationblocks.monitoring.listeners.QueueListeners
Illustrates how to use the QIL QueueListeners feature, and
how to add to (or remove from) a queue's queue listener list, used for
subscribing to queue events.
Note that this feature is distinct from QIL's
InteractionListeners feature.
This class assumes that QIL factory has already been successfully
initialized.
| Constructor Summary | |
QueueListeners()
Creates a QueueListeners instance with a listener built in. |
|
QueueListeners(QILQueueListener singleListener)
Creates a QueueListeners instance with a listener
for use with subscribing to queue events. |
|
| Method Summary | |
void |
attachListener(java.lang.String queueName)
Adds the listener for this instance to the queue listeners list of the given queue. This method uses the listener instance provided or created in constructor. |
void |
dettachListener(java.lang.String queueName)
Removes the listener for this instance from the queue listeners list of the given queue. |
void |
startListening(java.lang.String queueName,
QILQueueListener listener)
Adds the listener for this instance to the queue listeners list of the given queue. |
void |
stopListening(java.lang.String queueName,
QILQueueListener listener)
Removes the listener for this instance from the queue listeners list of the given queue. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public QueueListeners(QILQueueListener singleListener)
QueueListeners instance with a listener
for use with subscribing to queue events.
singleListener - listener.public QueueListeners()
QueueListeners instance with a listener built in.
MyQILQueueListener| Method Detail |
public void startListening(java.lang.String queueName,
QILQueueListener listener)
throws QILRequestFailedException
To start getting events, call
the StartMonitoringQueue.startMonitoring(String) method.
queueName - queue name.listener - listener to be used for events dispatching.
QILRequestFailedException - various exceptions could be thrown
from here, the most interesting one is QILObjectNotFoundException
which indicates that a queue was not found.
public void stopListening(java.lang.String queueName,
QILQueueListener listener)
throws QILRequestFailedException
To stop getting events, call
the StartMonitoringQueue.stopMonitoring(String) method.
queueName - queue name.listener - listener to be removed from the listener list.
QILRequestFailedException
public void attachListener(java.lang.String queueName)
throws QILRequestFailedException
To start getting events, call
the StartMonitoringQueue.startMonitoring(String) method.
queueName - queue name.
QILRequestFailedException
public void dettachListener(java.lang.String queueName)
throws QILRequestFailedException
This method uses the listener instance provided or created in constructor.
To stop getting events, call
the StartMonitoringQueue.stopMonitoring(String) method.
queueName - queue name.
QILRequestFailedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||