接口 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 aProducerCallbackargument, often implemented as an anonymous inner class or as a lambda expression.The typical implementation will perform multiple operations on the supplied JMS
SessionandMessageProducer.
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 TdoInJms(Session session, MessageProducer producer)Perform operations on the givenSessionandMessageProducer.
方法详细资料
doInJms
T doInJms(Session session, MessageProducer producer) throws JMSException
Perform operations on the givenSessionandMessageProducer.The message producer is not associated with any destination unless when specified in the JmsTemplate call.
- 参数:
session- the JMSSessionobject to useproducer- the JMSMessageProducerobject to use- 返回:
- a result object from working with the
Session, if any (ornullif none) - 抛出:
JMSException- if thrown by JMS API methods