Class 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 Detail

      • AmqpJmsMessageFactory

        public AmqpJmsMessageFactory​(AmqpConnection connection)
    • Method Detail

      • createMessage

        public JmsMessage createMessage()
                                 throws jakarta.jms.JMSException
        Description copied from interface: JmsMessageFactory
        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.
        Specified by:
        createMessage in interface JmsMessageFactory
        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: JmsMessageFactory
        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.
        Specified by:
        createTextMessage in interface JmsMessageFactory
        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: JmsMessageFactory
        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.
        Specified by:
        createTextMessage in interface JmsMessageFactory
        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: JmsMessageFactory
        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.
        Specified by:
        createBytesMessage in interface JmsMessageFactory
        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: JmsMessageFactory
        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.
        Specified by:
        createMapMessage in interface JmsMessageFactory
        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: JmsMessageFactory
        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.
        Specified by:
        createStreamMessage in interface JmsMessageFactory
        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: JmsMessageFactory
        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.
        Specified by:
        createObjectMessage in interface JmsMessageFactory
        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: JmsMessageFactory
        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.
        Specified by:
        createObjectMessage in interface JmsMessageFactory
        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.