Class ObjectMessage

  • All Implemented Interfaces:
    Message, ObjectMessage

    public final class ObjectMessage
    extends Message
    implements ObjectMessage
    Implements the javax.jms.ObjectMessage interface.

    An ObjectMessage object is used to send a message that contains a unique serializable Java object. It inherits from the Message interface and adds a body containing a single reference to an object.

    When a client receives an ObjectMessage, it is in read-only mode. If a client attempts to write to the message at this point, a MessageNotWriteableException is thrown. If clearBody is called, the message can now be both read from and written to.

    • Constructor Detail

      • ObjectMessage

        ObjectMessage()
        Instantiates a bright new ObjectMessage.
      • ObjectMessage

        ObjectMessage​(Session session,
                      org.objectweb.joram.shared.messages.Message momMsg)
        Instantiates an ObjectMessage wrapping a consumed MOM message containing an object.
        Parameters:
        session - The consuming session.
        momMsg - The MOM message to wrap.