org.jboss.jms.client
Class JBossBrowser

java.lang.Object
  extended byorg.jboss.jms.client.JBossBrowser
All Implemented Interfaces:
QueueBrowser (src)

public class JBossBrowser
extends java.lang.Object
implements QueueBrowser (src)

A browser


Constructor Summary
JBossBrowser(BrowserDelegate (src)  delegate, Queue (src)  queue, java.lang.String selector)
          Create a new JBossBrowser
 
Method Summary
 void close()
          Closes the QueueBrowser.
 java.util.Enumeration getEnumeration()
          Gets an enumeration for browsing the current queue messages in the order they would be received.
 java.lang.String getMessageSelector()
          Gets this queue browser's message selector expression.
 Queue (src) getQueue()
          Gets the queue associated with this queue browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossBrowser

public JBossBrowser(BrowserDelegate (src)  delegate,
                    Queue (src)  queue,
                    java.lang.String selector)
             throws JMSException (src) 
Create a new JBossBrowser

Parameters:
delegate - the delegate
queue - the queue
selector - the selector
Throws:
JMSException (src) - for any error
Method Detail

close

public void close()
           throws JMSException (src) 
Description copied from interface: QueueBrowser (src)
Closes the QueueBrowser.

Since a provider may allocate some resources on behalf of a QueueBrowser outside the Java virtual machine, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.

Specified by:
close in interface QueueBrowser (src)
Throws:
JMSException (src) - if the JMS provider fails to close this browser due to some internal error.

getEnumeration

public java.util.Enumeration getEnumeration()
                                     throws JMSException (src) 
Description copied from interface: QueueBrowser (src)
Gets an enumeration for browsing the current queue messages in the order they would be received.

Specified by:
getEnumeration in interface QueueBrowser (src)
Returns:
an enumeration for browsing the messages
Throws:
JMSException (src) - if the JMS provider fails to get the enumeration for this browser due to some internal error.

getMessageSelector

public java.lang.String getMessageSelector()
                                    throws JMSException (src) 
Description copied from interface: QueueBrowser (src)
Gets this queue browser's message selector expression.

Specified by:
getMessageSelector in interface QueueBrowser (src)
Returns:
this queue browser's message selector, or null if no message selector exists for the message consumer (that is, if the message selector was not set or was set to null or the empty string)
Throws:
JMSException (src) - if the JMS provider fails to get the message selector for this browser due to some internal error.

getQueue

public Queue (src)  getQueue()
               throws JMSException (src) 
Description copied from interface: QueueBrowser (src)
Gets the queue associated with this queue browser.

Specified by:
getQueue in interface QueueBrowser (src)
Returns:
the queue
Throws:
JMSException (src) - if the JMS provider fails to get the queue associated with this browser due to some internal error.