Class QueueBrowserClient

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

public class QueueBrowserClient extends Object
The client class which is used to create a QueueConnection in order to browse the content of a selected queue.
  • Field Details

  • Constructor Details

    • QueueBrowserClient

      public QueueBrowserClient(String nameOfQueue, String userName, String accessKey) throws FileNotFoundException, XMLStreamException, org.wso2.andes.kernel.AndesException
      Constructor - create a new browser instance for the given queue as given user.
      Parameters:
      nameOfQueue - name of queue
      userName - User's username as per user store
      accessKey - as generated by andes authentication service for the user.
      Throws:
      FileNotFoundException
      XMLStreamException
      org.wso2.andes.kernel.AndesException
  • Method Details

    • browseQueue

      public Enumeration browseQueue()
      Return a lazy-loading iterator (java.util.Enumeration) of the messages of the given queue.
      Returns:
      java.util.Enumeration
    • closeBrowser

      public void closeBrowser() throws javax.jms.JMSException
      Close browser instance on this queue of this user.
      Throws:
      javax.jms.JMSException
    • getMsgProperties

      public String getMsgProperties(javax.jms.Message queueMessage) throws javax.jms.JMSException
      Get message details of the input javax.jms.Message object.
      Parameters:
      queueMessage - javax.jms.Message (ideally fetched through the Queue Browser Enumeration)
      Returns:
      String representation of the message
      Throws:
      javax.jms.JMSException
    • getMsgContentType

      public String getMsgContentType(javax.jms.Message queueMessage)
      Determines the type of the JMS message
      Parameters:
      queueMessage - - input message
      Returns:
      type of the message as a string