Top Description Methods
org.springframework.jms.core

public Interface BrowserCallback<T>

Annotations
@FunctionalInterface
Type Parameters
<T>
the result type
Imports
jakarta.jms.JMSException, .QueueBrowser, .Session, org.springframework.lang.Nullable

Callback for browsing the messages in a JMS queue.

To be used with JmsTemplate's callback methods that take a BrowserCallback argument, often implemented as an anonymous inner class or as a lambda expression.

Author
Juergen Hoeller
Since
2.5.1
See Also
JmsTemplate#browse(BrowserCallback), JmsTemplate#browseSelected(String, BrowserCallback)

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

a result object from working with the Session, if any (or null if none)
doInJms
(Session
the JMS Session object to use
session
,
QueueBrowser
the JMS QueueBrowser object to use
browser
)

Perform operations on the given jakarta.jms.Session and jakarta.jms.QueueBrowser.

Method Detail

doInJmsback to summary
public T doInJms(Session session, QueueBrowser browser) throws JMSException

Perform operations on the given jakarta.jms.Session and jakarta.jms.QueueBrowser.

Parameters
session:Session

the JMS Session object to use

browser:QueueBrowser

the JMS QueueBrowser object to use

Returns:T

a result object from working with the Session, if any (or null if none)

Annotations
@Nullable
Exceptions
JMSException:
if thrown by JMS API methods