Class ActiveMQQueueBrowser
- java.lang.Object
-
- org.apache.activemq.artemis.jms.client.ActiveMQQueueBrowser
-
- All Implemented Interfaces:
QueueBrowser,AutoCloseable
public final class ActiveMQQueueBrowser extends Object implements QueueBrowser
ActiveMQ Artemis implementation of a JMS QueueBrowser.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedActiveMQQueueBrowser(ConnectionFactoryOptions options, ActiveMQQueue queue, String messageSelector, ClientSession session, boolean enable1xPrefixes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes theQueueBrowser.EnumerationgetEnumeration()Gets an enumeration for browsing the current queue messages in the order they would be received.StringgetMessageSelector()Gets this queue browser's message selector expression.QueuegetQueue()Gets the queue associated with this queue browser.StringtoString()
-
-
-
Constructor Detail
-
ActiveMQQueueBrowser
protected ActiveMQQueueBrowser(ConnectionFactoryOptions options, ActiveMQQueue queue, String messageSelector, ClientSession session, boolean enable1xPrefixes) throws JMSException
- Throws:
JMSException
-
-
Method Detail
-
close
public void close() throws JMSExceptionDescription copied from interface:QueueBrowserCloses theQueueBrowser.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:
closein interfaceAutoCloseable- Specified by:
closein interfaceQueueBrowser- Throws:
JMSException- if the Jakarta Messaging provider fails to close this browser due to some internal error.
-
getEnumeration
public Enumeration getEnumeration() throws JMSException
Description copied from interface:QueueBrowserGets an enumeration for browsing the current queue messages in the order they would be received.- Specified by:
getEnumerationin interfaceQueueBrowser- Returns:
- an enumeration for browsing the messages
- Throws:
JMSException- if the Jakarta Messaging provider fails to get the enumeration for this browser due to some internal error.
-
getMessageSelector
public String getMessageSelector() throws JMSException
Description copied from interface:QueueBrowserGets this queue browser's message selector expression.- Specified by:
getMessageSelectorin interfaceQueueBrowser- Returns:
- this queue browser's message selector, or null if no message selector exists for the message consumer (that is, if the message selector was not set or was set to null or the empty string)
- Throws:
JMSException- if the Jakarta Messaging provider fails to get the message selector for this browser due to some internal error.
-
getQueue
public Queue getQueue() throws JMSException
Description copied from interface:QueueBrowserGets the queue associated with this queue browser.- Specified by:
getQueuein interfaceQueueBrowser- Returns:
- the queue
- Throws:
JMSException- if the Jakarta Messaging provider fails to get the queue associated with this browser due to some internal error.
-
-