Package org.springframework.jms.core
Interface BrowserCallback<T>
public interface BrowserCallback<T>
Callback for browsing the messages in a JMS queue.To be used with
JmsTemplate's callback methods that take aBrowserCallbackargument, often implemented as an anonymous inner class or as a lambda expression.- Since:
- 2.5.1
- Author:
- Juergen Hoeller
- See Also:
JmsTemplate.browse(BrowserCallback),JmsTemplate.browseSelected(String, BrowserCallback)
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TdoInJms(Session session, QueueBrowser browser)Perform operations on the givenSessionandQueueBrowser.
Method Detail
doInJms
T doInJms(Session session, QueueBrowser browser) throws 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:
JMSException- if thrown by JMS API methods