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