Package org.apache.qpid.jms.message
Interface JmsMessageFactory
- All Known Implementing Classes:
AmqpJmsMessageFactory
public interface JmsMessageFactory
Interface 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
Modifier and TypeMethodDescriptionCreates an instance of a basic JmsBytesMessage object.Creates an instance of a basic JmsMapMessage object.Creates an instance of a basic JmsMessage object.Creates an instance of a basic JmsObjectMessage object.createObjectMessage(Serializable payload) Creates an instance of a basic JmsObjectMessage object.Creates an instance of a basic JmsStreamMessage object.Creates an instance of a basic JmsTextMessage object.createTextMessage(String payload) Creates an instance of a basic JmsTextMessage object.
-
Method Details
-
createMessage
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
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
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
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
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
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
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
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.
-