Oracle® Streams Advanced Queuing Java API Reference
Release 1 (10.1)

B12023-01

oracle.jms
Class AQjmsQueueBrowser

java.lang.Object
  |
  +--oracle.jms.AQjmsObject
        |
        +--oracle.jms.AQjmsQueueBrowser
All Implemented Interfaces:
java.util.Enumeration, QueueBrowser

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

Oracle class implementing javax.jms.QueueBrowser, java.util.Enumeration


Method Summary
 void close()
          Closes the QueueBrowser.
 java.util.Enumeration getEnumeration()
          Get an enumeration for browsing the current queue messages in the order they would be received.
 java.lang.String getMessageSelector()
          Get this queue browser's message selector expression.
 javax.jms.Queue getQueue()
          Get the queue associated with this queue browser.
 java.lang.String getTransformation()
          Get the transformation for the Consumer
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 java.lang.Object nextElement()
          Returns the next element of this enumeration.
 void purgeSeen()
           Purge messages seen so far during browse.
 void setTransformation(java.lang.String transformation)
          Set transformation for the browser.

 

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
Overrides:
close in class oracle.jms.AQjmsObject
Throws:
JMSException - if the JMS provider fails to close this browser due to some internal error.

getQueue

public javax.jms.Queue getQueue()
                         throws JMSException
Get the queue associated with this queue browser.
Specified by:
getQueue in interface QueueBrowser
Returns:
the queue
Throws:
JMSException - if JMS fails to get the queue associated with this Browser due to some JMS error.

getEnumeration

public java.util.Enumeration getEnumeration()
                                     throws JMSException
Get 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 JMS fails to get the enumeration for this browser due to some JMS error.

getMessageSelector

public java.lang.String getMessageSelector()
                                    throws JMSException
Get this queue browser's message selector expression.
Specified by:
getMessageSelector in interface QueueBrowser
Returns:
this queue browser's message selector
Throws:
JMSException - if JMS fails to get message selector due to some JMS 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

Purge messages seen so far during browse. The purge will be finalized only when the session for the queue browse is committed.

Throws:
JMSException - if a JMS error occurred during the purge operation.

setTransformation

public void setTransformation(java.lang.String transformation)
Set transformation for the browser. This transformation will be applied before the message is returned to the user.
Parameters:
transformation - transformation name

getTransformation

public java.lang.String getTransformation()
Get the transformation for the Consumer

Oracle® Streams Advanced Queuing Java API Reference
Release 1 (10.1)

B12023-01

Copyright © 2003, Oracle. All Rights Reserved.