Interface MessageCreator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
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.
- Since:
- 1.1
- Author:
- Mark Pollack
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.jms.MessagecreateMessage(jakarta.jms.Session session) Create aMessageto be sent.
-
Method Details
-
createMessage
jakarta.jms.Message createMessage(jakarta.jms.Session session) throws jakarta.jms.JMSException Create aMessageto be sent.- Parameters:
session- the JMSSessionto be used to create theMessage(nevernull)- Returns:
- the
Messageto be sent - Throws:
jakarta.jms.JMSException- if thrown by JMS API methods
-