Package org.springframework.jms.core
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.
@FunctionalInterface public interface MessageCreator
Creates a JMS message given aSession
.The
Session
typically is provided by an instance of theJmsTemplate
class.Implementations do not need to concern themselves with checked
JMSExceptions
(from the 'javax.jms
' package) that may be thrown from operations they attempt. TheJmsTemplate
will catch and handle theseJMSExceptions
appropriately.- Since:
- 1.1
- Author:
- Mark Pollack
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Message
createMessage(Session session)
Create aMessage
to be sent.
Method Detail
createMessage
Message createMessage(Session session) throws JMSException
Create aMessage
to be sent.- Parameters:
session
- the JMSSession
to be used to create theMessage
(nevernull
)- Returns:
- the
Message
to be sent - Throws:
JMSException
- if thrown by JMS API methods