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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JmsBytesMessage
createBytesMessage()
Creates an instance of a basic JmsBytesMessage object.JmsMapMessage
createMapMessage()
Creates an instance of a basic JmsMapMessage object.JmsMessage
createMessage()
Creates an instance of a basic JmsMessage object.JmsObjectMessage
createObjectMessage()
Creates an instance of a basic JmsObjectMessage object.JmsObjectMessage
createObjectMessage(java.io.Serializable payload)
Creates an instance of a basic JmsObjectMessage object.JmsStreamMessage
createStreamMessage()
Creates an instance of a basic JmsStreamMessage object.JmsTextMessage
createTextMessage()
Creates an instance of a basic JmsTextMessage object.JmsTextMessage
createTextMessage(java.lang.String payload)
Creates an instance of a basic JmsTextMessage object.
-
-
-
Method Detail
-
createMessage
JmsMessage createMessage() throws javax.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:
javax.jms.JMSException
- if the provider cannot create the message for some reason.
-
createTextMessage
JmsTextMessage createTextMessage(java.lang.String payload) throws javax.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:
javax.jms.JMSException
- if the provider cannot create the message for some reason.
-
createTextMessage
JmsTextMessage createTextMessage() throws javax.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:
javax.jms.JMSException
- if the provider cannot create the message for some reason.
-
createBytesMessage
JmsBytesMessage createBytesMessage() throws javax.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:
javax.jms.JMSException
- if the provider cannot create the message for some reason.
-
createMapMessage
JmsMapMessage createMapMessage() throws javax.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:
javax.jms.JMSException
- if the provider cannot create the message for some reason.
-
createStreamMessage
JmsStreamMessage createStreamMessage() throws javax.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:
javax.jms.JMSException
- if the provider cannot create the message for some reason.
-
createObjectMessage
JmsObjectMessage createObjectMessage(java.io.Serializable payload) throws javax.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:
javax.jms.JMSException
- if the provider cannot create the message for some reason.
-
createObjectMessage
JmsObjectMessage createObjectMessage() throws javax.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:
javax.jms.JMSException
- if the provider cannot create the message for some reason.
-
-