Top Description Methods
org.springframework.jms.core

public Interface MessageCreator

Known Direct Implementers
org.springframework.jms.core.JmsMessagingTemplate.MessagingMessageCreator
Annotations
@FunctionalInterface
Imports
jakarta.jms.JMSException, .Message, .Session

Creates a JMS message given a Session.

The Session typically is provided by an instance of the JmsTemplate class.

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

Author
Mark Pollack
Since
1.1

Method Summary

Modifier and TypeMethod and Description
public Message

Returns:

the Message to be sent
createMessage
(Session
the JMS Session to be used to create the Message (never null)
session
)

Create a Message to be sent.

Method Detail

createMessageback to summary
public Message createMessage(Session session) throws JMSException

Create a Message to be sent.

Parameters
session:Session

the JMS Session to be used to create the Message (never null)

Returns:Message

the Message to be sent

Exceptions
JMSException:
if thrown by JMS API methods