站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

MessageCreator (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.jms.core
Interface MessageCreator


public interface MessageCreator

The callback interface used by JmsTemplate. This interface creates a JMS message given a session, provided by the JmsTemplate.

Implementations do not need to concern themselves with checked JMSException (from javax.jms) that may be thrown from operations they attempt. The JmsTemplate will catch and handle these JMSExceptions appropriately.

If extra parameters need to be set, such as the delivery mode, priority or time to live, override any of the getters with your own implementation.

Since:
1.1
Author:
Mark Pollack

Method Summary
 Message createMessage(Session session)
          Implement this method to return a message to be sent.
 

Method Detail

createMessage

Message createMessage(Session session)
                      throws JMSException
Implement this method to return a message to be sent.

Parameters:
session - the JMS session
Returns:
the message to be sentt
Throws:
JMSException - if thrown by JMS API methods


Copyright (c) 2002-2007 The Spring Framework Project.