接口 BrowserCallback<T>
- 类型参数:
T- the result type
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface 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.- 从以下版本开始:
- 2.5.1
- 作者:
- Juergen Hoeller
- 另请参阅:
JmsTemplate.browse(BrowserCallback),JmsTemplate.browseSelected(String, BrowserCallback)
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 TdoInJms(Session session, QueueBrowser browser)Perform operations on the givenSessionandQueueBrowser.
方法详细资料
doInJms
@Nullable T doInJms(Session session, QueueBrowser browser) throws JMSException
Perform operations on the givenSessionandQueueBrowser.- 参数:
session- the JMSSessionobject to usebrowser- the JMSQueueBrowserobject to use- 返回:
- a result object from working with the
Session, if any (ornullif none) - 抛出:
JMSException- if thrown by JMS API methods