Package org.apache.qpid.jms.message
Interface JmsMessageFactory
-
- All Known Implementing Classes:
AmqpJmsMessageFactory
public interface JmsMessageFactoryInterface that a Provider should implement to provide a Provider Specific JmsMessage implementation that optimizes the exchange of message properties and payload between the JMS Message API and the underlying Provider Message implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JmsBytesMessagecreateBytesMessage()Creates an instance of a basic JmsBytesMessage object.JmsMapMessagecreateMapMessage()Creates an instance of a basic JmsMapMessage object.JmsMessagecreateMessage()Creates an instance of a basic JmsMessage object.JmsObjectMessagecreateObjectMessage()Creates an instance of a basic JmsObjectMessage object.JmsObjectMessagecreateObjectMessage(java.io.Serializable payload)Creates an instance of a basic JmsObjectMessage object.JmsStreamMessagecreateStreamMessage()Creates an instance of a basic JmsStreamMessage object.JmsTextMessagecreateTextMessage()Creates an instance of a basic JmsTextMessage object.JmsTextMessagecreateTextMessage(java.lang.String payload)Creates an instance of a basic JmsTextMessage object.
-
-
-
Method Detail
-
createMessage
JmsMessage createMessage() throws jakarta.jms.JMSException
Creates an instance of a basic JmsMessage object. The provider may either create the Message with the default generic internal message implementation or create a Provider specific instance that optimizes the access and marshaling of the message.- Returns:
- a newly created and initialized JmsMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createTextMessage
JmsTextMessage createTextMessage(java.lang.String payload) throws jakarta.jms.JMSException
Creates an instance of a basic JmsTextMessage object. The provider may either create the Message with the default generic internal message implementation or create a Provider specific instance that optimizes the access and marshaling of the message.- Parameters:
payload- The value to initially assign to the Message body, or null if empty to start.- Returns:
- a newly created and initialized JmsTextMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createTextMessage
JmsTextMessage createTextMessage() throws jakarta.jms.JMSException
Creates an instance of a basic JmsTextMessage object. The provider may either create the Message with the default generic internal message implementation or create a Provider specific instance that optimizes the access and marshaling of the message.- Returns:
- a newly created and initialized JmsTextMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createBytesMessage
JmsBytesMessage createBytesMessage() throws jakarta.jms.JMSException
Creates an instance of a basic JmsBytesMessage object. The provider may either create the Message with the default generic internal message implementation or create a Provider specific instance that optimizes the access and marshaling of the message.- Returns:
- a newly created and initialized JmsTextMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createMapMessage
JmsMapMessage createMapMessage() throws jakarta.jms.JMSException
Creates an instance of a basic JmsMapMessage object. The provider may either create the Message with the default generic internal message implementation or create a Provider specific instance that optimizes the access and marshaling of the message.- Returns:
- a newly created and initialized JmsTextMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createStreamMessage
JmsStreamMessage createStreamMessage() throws jakarta.jms.JMSException
Creates an instance of a basic JmsStreamMessage object. The provider may either create the Message with the default generic internal message implementation or create a Provider specific instance that optimizes the access and marshaling of the message.- Returns:
- a newly created and initialized JmsTextMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createObjectMessage
JmsObjectMessage createObjectMessage(java.io.Serializable payload) throws jakarta.jms.JMSException
Creates an instance of a basic JmsObjectMessage object. The provider may either create the Message with the default generic internal message implementation or create a Provider specific instance that optimizes the access and marshaling of the message.- Parameters:
payload- The value to initially assign to the Message body, or null if empty to start.- Returns:
- a newly created and initialized JmsObjectMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createObjectMessage
JmsObjectMessage createObjectMessage() throws jakarta.jms.JMSException
Creates an instance of a basic JmsObjectMessage object. The provider may either create the Message with the default generic internal message implementation or create a Provider specific instance that optimizes the access and marshaling of the message.- Returns:
- a newly created and initialized JmsObjectMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
-