|
Oracle® Streams Advanced Queuing Java API Reference Release 1 (10.1) B12023-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jms.AQjmsObject | +--oracle.jms.AQjmsTopicBrowser
Oracle class implementing javax.jms.TopicBrowser, java.util.Enumeration
Method Summary | |
void |
close() Since a provider may allocate some resources on behalf of a TopicBrowser outside the JVM, clients should close them when they are not needed. |
java.util.Enumeration |
getEnumeration() Get an enumeration for browsing the current topic messages in the order they would be received. |
java.lang.String |
getMessageSelector() Get this topic browser's message selector expression. |
javax.jms.Topic |
getTopic() Get the topic associated with this topic browser. |
java.lang.String |
getTransformation() Get the transformation for the Consumer |
boolean |
hasMoreElements() Check 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 |
public void close() throws JMSException
TopicBrowser
Since a provider may allocate some resources on behalf of a TopicBrowser outside the JVM, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.
close
in interface TopicBrowser
close
in class oracle.jms.AQjmsObject
JMSException
- if a JMS fails to close this Browser due to some JMS error.public javax.jms.Topic getTopic() throws JMSException
Get the topic associated with this topic browser.
getTopic
in interface TopicBrowser
JMSException
- if JMS fails to get the topic associated with this Browser due to some JMS error.public java.util.Enumeration getEnumeration()
Get an enumeration for browsing the current topic messages in the order they would be received.
If getEnumeration()
is called twice on the same TopicBrowser, the same enumeration object is returned. Hence the nextElement()
call on one enumeration object would modify the state second enumeration object too.
getEnumeration
in interface TopicBrowser
public java.lang.String getMessageSelector() throws JMSException
Get this topic browser's message selector expression.
getMessageSelector
in interface TopicBrowser
JMSException
- if JMS fails to get message selector due to some JMS errorpublic java.lang.Object nextElement() throws java.util.NoSuchElementException
Returns the next element of this enumeration.
Attempt to use cached messages (if one is available from a previous call to hasMoreElements()
). If the browser's selector used message ID, only one message can ever be returned during the browse; cache this state for subsequent calls.
nextElement
in interface java.util.Enumeration
java.util.NoSuchElementException
- if no more elements exist.public boolean hasMoreElements()
Check if this enumeration contains more elements.
Attempt to cach messages (for use by a subsequent call to nextElement()
). If the browser's selector uses message ID, only one message can ever be returned during the browse; cache this state for subsequent calls.
hasMoreElements
in interface java.util.Enumeration
public void purgeSeen() throws JMSException
Purge messages seen so far during browse. The purge will be finalized only when the session for the topic browse is committed.
purgeSeen
in interface TopicBrowser
JMSException
- if a JMS error occurred during the purge operation.public void setTransformation(java.lang.String transformation)
transformation
- transformation namepublic java.lang.String getTransformation()
|
Oracle® Streams Advanced Queuing Java API Reference Release 1 (10.1) B12023-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |