public class SolQueueBrowser extends Object implements SolQueueBrowserIF
| Constructor and Description |
|---|
SolQueueBrowser(SolSessionIF session,
Queue queue,
String messageSelector) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the
QueueBrowser. |
Enumeration<?> |
getEnumeration()
Gets an enumeration for browsing the current queue messages in the
order they would be received.
|
Browser |
getJCSMPBrowser() |
String |
getMessageSelector()
Gets this queue browser's message selector expression.
|
Queue |
getQueue()
Gets the queue associated with this queue browser.
|
int |
getTimeout() |
public SolQueueBrowser(SolSessionIF session, Queue queue, String messageSelector) throws JMSException
JMSExceptionpublic int getTimeout()
getTimeout in interface SolQueueBrowserIFpublic void close()
throws JMSException
QueueBrowserQueueBrowser.
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.
close in interface SolCloseableIFclose in interface QueueBrowserJMSException - if the JMS provider fails to close this
browser due to some internal error.public Enumeration<?> getEnumeration() throws JMSException
QueueBrowserEnumeration.hasMoreElements()Returns true if there's at least one message available in the browser's local message buffer. Note: If this method returns false, it does not mean that the queue is empty; subsequent calls to hasMoreElements orEnumeration.nextElement()might return true and a message respectively.Note: A properpty
SupportedProperty.SOLACE_JMS_BROWSER_TIMEOUT_IN_MScould be used to specify the maximum time in milliseconds for a QueueBrowser Enumeration.hasMoreElements() to wait for a message to arrive in the browser's local message buffer before returning.
getEnumeration in interface QueueBrowserJMSException - if the JMS provider fails to get the
enumeration for this browser
due to some internal error.SupportedProperty.SOLACE_JMS_BROWSER_TIMEOUT_IN_MSpublic String getMessageSelector() throws JMSException
QueueBrowsergetMessageSelector in interface QueueBrowserJMSException - if the JMS provider fails to get the
message selector for this browser
due to some internal error.public Queue getQueue() throws JMSException
QueueBrowsergetQueue in interface QueueBrowserJMSException - if the JMS provider fails to get the
queue associated with this browser
due to some internal error.public Browser getJCSMPBrowser() throws JMSException
getJCSMPBrowser in interface SolQueueBrowserIFJMSExceptionCopyright 2004-2020 Solace Corporation. All rights reserved.