Class AmqpJmsMessageFactory
- java.lang.Object
-
- org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFactory
-
- All Implemented Interfaces:
JmsMessageFactory
public class AmqpJmsMessageFactory extends java.lang.Object implements JmsMessageFactory
AMQP Message Factory instance used to create new JmsMessage types that wrap an Proton AMQP Message. This class is used by the JMS layer to create its JMS Message instances, the messages returned here should be created in a proper initially empty state for the client to populate.
-
-
Constructor Summary
Constructors Constructor Description AmqpJmsMessageFactory(AmqpConnection connection)
-
Method Summary
All Methods Instance Methods Concrete 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.AmqpConnectiongetAmqpConnection()
-
-
-
Constructor Detail
-
AmqpJmsMessageFactory
public AmqpJmsMessageFactory(AmqpConnection connection)
-
-
Method Detail
-
getAmqpConnection
public AmqpConnection getAmqpConnection()
-
createMessage
public JmsMessage createMessage() throws jakarta.jms.JMSException
Description copied from interface:JmsMessageFactoryCreates 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.- Specified by:
createMessagein interfaceJmsMessageFactory- Returns:
- a newly created and initialized JmsMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createTextMessage
public JmsTextMessage createTextMessage() throws jakarta.jms.JMSException
Description copied from interface:JmsMessageFactoryCreates 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.- Specified by:
createTextMessagein interfaceJmsMessageFactory- Returns:
- a newly created and initialized JmsTextMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createTextMessage
public JmsTextMessage createTextMessage(java.lang.String payload) throws jakarta.jms.JMSException
Description copied from interface:JmsMessageFactoryCreates 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.- Specified by:
createTextMessagein interfaceJmsMessageFactory- 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.
-
createBytesMessage
public JmsBytesMessage createBytesMessage() throws jakarta.jms.JMSException
Description copied from interface:JmsMessageFactoryCreates 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.- Specified by:
createBytesMessagein interfaceJmsMessageFactory- Returns:
- a newly created and initialized JmsTextMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createMapMessage
public JmsMapMessage createMapMessage() throws jakarta.jms.JMSException
Description copied from interface:JmsMessageFactoryCreates 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.- Specified by:
createMapMessagein interfaceJmsMessageFactory- Returns:
- a newly created and initialized JmsTextMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createStreamMessage
public JmsStreamMessage createStreamMessage() throws jakarta.jms.JMSException
Description copied from interface:JmsMessageFactoryCreates 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.- Specified by:
createStreamMessagein interfaceJmsMessageFactory- Returns:
- a newly created and initialized JmsTextMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createObjectMessage
public JmsObjectMessage createObjectMessage() throws jakarta.jms.JMSException
Description copied from interface:JmsMessageFactoryCreates 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.- Specified by:
createObjectMessagein interfaceJmsMessageFactory- Returns:
- a newly created and initialized JmsObjectMessage instance.
- Throws:
jakarta.jms.JMSException- if the provider cannot create the message for some reason.
-
createObjectMessage
public JmsObjectMessage createObjectMessage(java.io.Serializable payload) throws jakarta.jms.JMSException
Description copied from interface:JmsMessageFactoryCreates 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.- Specified by:
createObjectMessagein interfaceJmsMessageFactory- 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.
-
-