Class AmqpJmsObjectMessageFacade

    • Constructor Detail

      • AmqpJmsObjectMessageFacade

        public AmqpJmsObjectMessageFacade()
    • Method Detail

      • getJmsMsgType

        public byte getJmsMsgType()
        Overrides:
        getJmsMsgType in class AmqpJmsMessageFacade
        Returns:
        the appropriate byte value that indicates the type of message this is.
      • isAmqpTypedEncoding

        public boolean isAmqpTypedEncoding()
      • getObject

        public java.io.Serializable getObject()
                                       throws java.io.IOException,
                                              java.lang.ClassNotFoundException
        Description copied from interface: JmsObjectMessageFacade
        Gets the Object value that is contained in the provider message. If the Object is stored in some serialized form then the Provider must de-serialize the object prior to returning it.
        Specified by:
        getObject in interface JmsObjectMessageFacade
        Returns:
        the de-serialized version of the contained object.
        Throws:
        java.io.IOException - if the provider fails to get the object due to some internal error.
        java.lang.ClassNotFoundException - if object de-serialization fails because the ClassLoader cannot find the Class locally.
      • setObject

        public void setObject​(java.io.Serializable value)
                       throws java.io.IOException
        Description copied from interface: JmsObjectMessageFacade
        Stores the given object into the provider Message. In order for the provider to be fully JMS compliant the set Object should be immediately serialized and stored so that future modifications to the object are not reflected in the stored version of the object.
        Specified by:
        setObject in interface JmsObjectMessageFacade
        Parameters:
        value - the new value to write to the provider message.
        Throws:
        java.io.IOException - if the provider fails to store the object due to some internal error.
      • hasBody

        public boolean hasBody()
        Description copied from interface: JmsMessageFacade
        Returns true if the underlying message has a body, false if the body is empty.
        Specified by:
        hasBody in interface JmsMessageFacade
        Overrides:
        hasBody in class AmqpJmsMessageFacade
        Returns:
        true if the underlying message has a body, false if the body is empty.
      • onSend

        public void onSend​(long producerTtl)
                    throws javax.jms.JMSException
        Description copied from interface: JmsMessageFacade
        Called before a message is sent to allow a Message instance to move the contents from a logical data structure to a binary form for transmission, or other processing such as setting proper message headers etc. The method allows for passing through producer configuration details not explicitly mapped into the JMS Message allowing the facade to create the most correct and compact message on the wire.
        Specified by:
        onSend in interface JmsMessageFacade
        Overrides:
        onSend in class AmqpJmsMessageFacade
        Parameters:
        producerTtl - the time to live value configured on the producer when sent.
        Throws:
        javax.jms.JMSException - if an error occurs while preparing the message for send.