Class ActiveMQRAObjectMessage

java.lang.Object
org.apache.activemq.artemis.ra.ActiveMQRAMessage
org.apache.activemq.artemis.ra.ActiveMQRAObjectMessage
All Implemented Interfaces:
Message, ObjectMessage

public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements ObjectMessage
A wrapper for a ObjectMessage.
  • Constructor Details

  • Method Details

    • getObject

      public Serializable getObject() throws JMSException
      Gets the serializable object containing this message's data. The default value is null.
      Specified by:
      getObject in interface ObjectMessage
      Returns:
      the serializable object containing this message's data
      Throws:
      JMSException - if the Jakarta Messaging provider fails to get the object due to some internal error.
      MessageFormatException - if object deserialization fails.
    • setObject

      public void setObject(Serializable object) throws JMSException
      Sets the serializable object containing this message's data. It is important to note that an ObjectMessage contains a snapshot of the object at the time setObject() is called; subsequent modifications of the object will have no effect on the ObjectMessage body.
      Specified by:
      setObject in interface ObjectMessage
      Parameters:
      object - the message's data
      Throws:
      JMSException - if the Jakarta Messaging provider fails to set the object due to some internal error.
      MessageFormatException - if object serialization fails.
      MessageNotWriteableException - if the message is in read-only mode.