Class QueueReceiverClient

java.lang.Object
org.wso2.carbon.andes.ui.client.QueueReceiverClient

public class QueueReceiverClient extends Object
This class acts as the interface to act on a queue from a subscriber's perspective.
  • Field Details

  • 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 queue
      username - User's username as per user store
      accesskey - as generated by andes authentication service for the user.
      Returns:
      javax.jms.Queue
      Throws:
      NamingException
      javax.jms.JMSException
      FileNotFoundException
      XMLStreamException
      org.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.JMSException
      Close the message receiver
      Returns:
      true if all resources related to this receiver instance are released and removed.
      Throws:
      javax.jms.JMSException