Interface BrowserCallback<T>
- Type Parameters:
T- the result type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
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.
- since:
- 2.5.1
- Author:
- Juergen Hoeller
- see Also:
-
Method summary
-
Method Details
-
doInJms
@Nullable T doInJms(jakarta.jms.session session, jakarta.jms.QueueBrowser browser) throws jakarta.jms.JMsException Perform operations on the givensessionandQueueBrowser.- Parameters:
session- the JMssessionobject to usebrowser- the JMsQueueBrowserobject to use- Returns:
- a result object from working with the
session, if any (ornullif none) - Throws:
jakarta.jms.JMsException- if thrown by JMs API methods
-