Oracle® Streams Advanced Queuing Java API Reference
10g Release 2 (10.2)

B14291-01


oracle.jms
Class AQjmsQueueBrowser

java.lang.Object
  extended byoracle.jms.AQjmsObject
      extended byoracle.jms.AQjmsQueueBrowser

All Implemented Interfaces:
java.util.Enumeration, QueueBrowser

public class AQjmsQueueBrowser
extends oracle.jms.AQjmsObject
implements QueueBrowser, java.util.Enumeration

This is an Oracle class which implements javax.jms.QueueBrowser and java.util.Enumeration.


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 getQueue()
Gets the queue associated with this queue browser.
java.lang.String getTransformation()
Gets this browser's transformation.
boolean hasMoreElements()
Tests if this enumeration contains more elements.
java.lang.Object nextElement()
Returns the next element of this enumeration.
void purgeSeen()
Purges messages seen so far during browse.
void setTransformation(java.lang.String transformation)
Sets this browser's transformation.

Methods inherited from class oracle.jms.AQjmsObject
checkClosed, children, finalize, getID, getParent, isOpen, localClose, preClose

Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

close

public void close()
           throws JMSException
Description copied from interface: QueueBrowser
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
Throws:
JMSException

getQueue

public Queue getQueue()
               throws JMSException
Gets the queue associated with this queue browser.
Specified by:
getQueue in interface QueueBrowser
Returns:
the queue
Throws:
JMSException - if the queue is not retrieved due to some error.

getEnumeration

public java.util.Enumeration getEnumeration()
                                     throws JMSException
Gets an enumeration for browsing the current queue messages in the order they would be received.
Specified by:
getEnumeration in interface QueueBrowser
Returns:
an enumeration for browsing the messages
Throws:
JMSException - if the enumeration is not retrieved due to some error.

getMessageSelector

public java.lang.String getMessageSelector()
                                    throws JMSException
Gets this queue browser's message selector expression.
Specified by:
getMessageSelector in interface QueueBrowser
Returns:
this queue browser's message selector
Throws:
JMSException - if the message selector is not retrieved due to some error.

nextElement

public java.lang.Object nextElement()
                             throws java.util.NoSuchElementException
Returns the next element of this enumeration.
Specified by:
nextElement in interface java.util.Enumeration
Returns:
the next element of this enumeration
Throws:
java.util.NoSuchElementException - if no more elements exist.

hasMoreElements

public boolean hasMoreElements()
Tests if this enumeration contains more elements.
Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if more elements exist in the enumeration, false otherwise

purgeSeen

public void purgeSeen()
               throws JMSException
Purges messages seen so far during browse. The purge will be finalized only when the session for the queue browse is committed.
Throws:
JMSException - if an error occurs during the purge operation.

setTransformation

public void setTransformation(java.lang.String transformation)
Sets this browser's transformation. This transformation will be applied before the message is returned to the user.
Parameters:
transformation - the transformation to use when getting messages

getTransformation

public java.lang.String getTransformation()
Gets this browser's transformation.
Returns:
the transformation used when getting messages

Oracle® Streams Advanced Queuing Java API Reference
10g Release 2 (10.2)

B14291-01


Copyright © 2003, 2005, Oracle. All rights reserved.