接口 SessionCallback<T>
- 类型参数:
T
- the result type
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface SessionCallback<T>
Callback for executing any number of operations on a providedSession
.To be used with the
JmsTemplate.execute(SessionCallback)
method, often implemented as an anonymous inner class or as a lambda expression.- 从以下版本开始:
- 1.1
- 作者:
- Mark Pollack
- 另请参阅:
JmsTemplate.execute(SessionCallback)
方法详细资料
doInJms
@Nullable T doInJms(Session session) throws JMSException
Execute any number of operations against the supplied JMSSession
, possibly returning a result.- 参数:
session
- the JMSSession
- 返回:
- a result object from working with the
Session
, if any (ornull
if none) - 抛出:
JMSException
- if thrown by JMS API methods