org.objectweb.joram.client.jms
Class QueueBrowser

java.lang.Object
  extended by org.objectweb.joram.client.jms.QueueBrowser
All Implemented Interfaces:
javax.jms.QueueBrowser

public class QueueBrowser
extends java.lang.Object
implements javax.jms.QueueBrowser

Implements the javax.jms.QueueBrowser interface.


Nested Class Summary
private  class QueueBrowser.QueueEnumeration
          The QueueEnumeration class is used to enumerate the browses sent by queues.
 
Field Summary
private  boolean closed
          true if the browser is closed.
private static org.objectweb.util.monolog.api.Logger logger
           
private  Queue queue
          The queue the browser browses.
private  java.lang.String selector
          The selector for filtering messages.
private  Session sess
          The session the browser belongs to.
 
Constructor Summary
QueueBrowser(Session sess, Queue queue, java.lang.String selector)
          Constructs a browser.
 
Method Summary
 void close()
          API method.
 java.util.Enumeration getEnumeration()
          API method.
 java.lang.String getMessageSelector()
          API method.
 javax.jms.Queue getQueue()
          API method.
 java.lang.String toString()
          Returns a string view of this browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sess

private Session sess
The session the browser belongs to.


queue

private Queue queue
The queue the browser browses.


selector

private java.lang.String selector
The selector for filtering messages.


closed

private boolean closed
true if the browser is closed.


logger

private static org.objectweb.util.monolog.api.Logger logger
Constructor Detail

QueueBrowser

QueueBrowser(Session sess,
             Queue queue,
             java.lang.String selector)
       throws javax.jms.JMSException
Constructs a browser.

Parameters:
sess - The session the browser belongs to.
queue - The queue the browser browses.
selector - The selector for filtering messages.
Throws:
javax.jms.InvalidDestinationException - if an invalid destination is specified.
javax.jms.InvalidSelectorException - If the selector syntax is invalid.
javax.jms.IllegalStateException - If the connection is broken.
javax.jms.JMSException - If the creation fails for any other reason.
Method Detail

toString

public java.lang.String toString()
Returns a string view of this browser.

Overrides:
toString in class java.lang.Object

getQueue

public javax.jms.Queue getQueue()
                         throws javax.jms.JMSException
API method.

Specified by:
getQueue in interface javax.jms.QueueBrowser
Throws:
javax.jms.IllegalStateException - If the browser is closed.
javax.jms.JMSException

getMessageSelector

public java.lang.String getMessageSelector()
                                    throws javax.jms.JMSException
API method.

Specified by:
getMessageSelector in interface javax.jms.QueueBrowser
Throws:
javax.jms.IllegalStateException - If the browser is closed.
javax.jms.JMSException

getEnumeration

public java.util.Enumeration getEnumeration()
                                     throws javax.jms.JMSException
API method.

Specified by:
getEnumeration in interface javax.jms.QueueBrowser
Throws:
javax.jms.IllegalStateException - If the browser is closed, or if the connection is broken.
javax.jms.JMSSecurityException - If the client is not a READER on the queue.
javax.jms.JMSException - If the request fails for any other reason.

close

public void close()
           throws javax.jms.JMSException
API method.

Specified by:
close in interface javax.jms.QueueBrowser
Throws:
javax.jms.JMSException - Actually never thrown.


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.