Package org.wso2.carbon.andes.ui.client
Class QueueReceiverClient
java.lang.Object
org.wso2.carbon.andes.ui.client.QueueReceiverClient
This class acts as the interface to act on a queue from a subscriber's perspective.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanClose the message receiverintpurgeQueue(javax.jms.Queue queue) Method to purge a queue as user request through the client.javax.jms.QueueregisterReceiver(String nameOfQueue, String username, String accesskey) Method used to register a subscriber to a queue.
-
Field Details
-
QPID_ICF
- See Also:
-
-
Constructor Details
-
QueueReceiverClient
public QueueReceiverClient()
-
-
Method Details
-
registerReceiver
public javax.jms.Queue registerReceiver(String nameOfQueue, String username, String accesskey) throws NamingException, javax.jms.JMSException, FileNotFoundException, XMLStreamException, org.wso2.andes.kernel.AndesException Method used to register a subscriber to a queue.- Parameters:
nameOfQueue- name of queueusername- User's username as per user storeaccesskey- as generated by andes authentication service for the user.- Returns:
- javax.jms.Queue
- Throws:
NamingExceptionjavax.jms.JMSExceptionFileNotFoundExceptionXMLStreamExceptionorg.wso2.andes.kernel.AndesException
-
purgeQueue
public int purgeQueue(javax.jms.Queue queue) throws javax.jms.JMSException Method to purge a queue as user request through the client.- Parameters:
queue- javax.jms.Queue object of Queue that needs to be purged.- Returns:
- deleted number of messages from the queue.
- Throws:
javax.jms.JMSException
-
closeReceiver
public boolean closeReceiver() throws javax.jms.JMSExceptionClose the message receiver- Returns:
- true if all resources related to this receiver instance are released and removed.
- Throws:
javax.jms.JMSException
-