接口 ProducerCallback<T>
public interface ProducerCallback<T>
Callback for sending a message to a JMS destination.To be used with
JmsTemplate
's callback methods that take aProducerCallback
argument, often implemented as an anonymous inner class or as a lambda expression.The typical implementation will perform multiple operations on the supplied JMS
Session
andMessageProducer
.
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 T
doInJms(Session session, MessageProducer producer)
Perform operations on the givenSession
andMessageProducer
.
方法详细资料
doInJms
T doInJms(Session session, MessageProducer producer) throws JMSException
Perform operations on the givenSession
andMessageProducer
.The message producer is not associated with any destination unless when specified in the JmsTemplate call.
- 参数:
session
- the JMSSession
object to useproducer
- the JMSMessageProducer
object to use- 返回:
- a result object from working with the
Session
, if any (ornull
if none) - 抛出:
JMSException
- if thrown by JMS API methods