Class MessageImpl

    • Constructor Detail

      • MessageImpl

        public MessageImpl()
    • Method Detail

      • createInstance

        public static MessageImpl createInstance​(int type)
      • getType

        protected int getType()
      • getPersistentKey

        public java.lang.Object getPersistentKey()
      • setPersistentKey

        public void setPersistentKey​(java.lang.Object persistentKey)
      • getStreamPKey

        public java.lang.Object getStreamPKey()
      • setStreamPKey

        public void setStreamPKey​(java.lang.Object streamPKey)
      • getMessageLength

        public long getMessageLength()
      • isCancelled

        public boolean isCancelled()
      • getDuplicateId

        public java.lang.String getDuplicateId()
      • setDuplicateId

        public void setDuplicateId​(java.lang.String duplicateId)
      • writeBody

        protected void writeBody​(java.io.DataOutput out)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • writeContent

        public void writeContent​(java.io.DataOutput out)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • writeContent

        public void writeContent​(ToClientSerializer serializer)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readBody

        protected void readBody​(java.io.DataInput in)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • readContent

        public void readContent​(LengthCaptureDataInput in)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • readContent

        public void readContent​(java.io.DataInput in)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • setUseThreadContextCL

        public void setUseThreadContextCL​(boolean b)
      • unfoldBuffers

        public void unfoldBuffers()
      • unfoldBody

        protected void unfoldBody()
      • getField

        public java.lang.Object getField​(java.lang.String name)
      • clearSwiftMQProps

        public void clearSwiftMQProps()
      • clearSwiftMQAllProps

        public void clearSwiftMQAllProps()
      • setSessionImpl

        public void setSessionImpl​(SwiftMQSession mySession)
      • setReadOnly

        public void setReadOnly​(boolean b)
      • setMessageIndex

        public void setMessageIndex​(MessageIndex messageIndex)
      • getSourceRouter

        public java.lang.String getSourceRouter()
      • setSourceRouter

        public void setSourceRouter​(java.lang.String sourceRouter)
      • getDestRouter

        public java.lang.String getDestRouter()
      • setDestRouter

        public void setDestRouter​(java.lang.String destRouter)
      • getDestQueue

        public java.lang.String getDestQueue()
      • setDestQueue

        public void setDestQueue​(java.lang.String destQueue)
      • removeProperty

        public void removeProperty​(java.lang.String name)
      • getJMSMessageID

        public java.lang.String getJMSMessageID()
                                         throws javax.jms.JMSException
        Get the message ID.

        The messageID header field contains a value that uniquely identifies each message sent by a provider.

        When a message is sent, messageID can be ignored. When the send method returns it contains a provider-assigned value.

        A JMSMessageID is a String value which should function as a unique key for identifying messages in a historical repository. The exact scope of uniqueness is provider defined. It should at least cover all messages for a specific installation of a provider where an installation is some connected set of message routers.

        All JMSMessageID values must start with the prefix `ID:'. Uniqueness of message ID values across different providers is not required.

        Since message ID's take some effort to create and increase a message's size, some JMS providers may be able to optimize message overhead if they are given a hint that message ID is not used by an application. JMS message Producers provide a hint to disable message ID. When a client sets a Producer to disable message ID they are saying that they do not depend on the value of message ID for the messages it produces. These messages must either have message ID set to null or, if the hint is ignored, messageID must be set to its normal unique value.

        Specified by:
        getJMSMessageID in interface javax.jms.Message
        Returns:
        the message ID
        Throws:
        javax.jms.JMSException - if JMS fails to get the message Id due to internal JMS error.
      • setJMSMessageID

        public void setJMSMessageID​(java.lang.String id)
                             throws javax.jms.JMSException
        Set the message ID.

        Providers set this field when a message is sent. This operation can be used to change the value of a message that's been received.

        Specified by:
        setJMSMessageID in interface javax.jms.Message
        Parameters:
        id - the ID of the message
        Throws:
        javax.jms.JMSException - if JMS fails to set the message Id due to internal JMS error.
        See Also:
        Message.getJMSMessageID()
      • getJMSTimestamp

        public long getJMSTimestamp()
                             throws javax.jms.JMSException
        Get the message timestamp.

        The JMSTimestamp header field contains the time a message was handed off to a provider to be sent. It is not the time the message was actually transmitted because the actual send may occur later due to transactions or other client side queueing of messages.

        When a message is sent, JMSTimestamp is ignored. When the send method returns it contains a a time value somewhere in the interval between the call and the return. It is in the format of a normal Java millis time value.

        Since timestamps take some effort to create and increase a message's size, some JMS providers may be able to optimize message overhead if they are given a hint that timestamp is not used by an application. JMS message Producers provide a hint to disable timestamps. When a client sets a producer to disable timestamps they are saying that they do not depend on the value of timestamp for the messages it produces. These messages must either have timestamp set to null or, if the hint is ignored, timestamp must be set to its normal value.

        Specified by:
        getJMSTimestamp in interface javax.jms.Message
        Returns:
        the message timestamp
        Throws:
        javax.jms.JMSException - if JMS fails to get the Timestamp due to internal JMS error.
      • setJMSTimestamp

        public void setJMSTimestamp​(long timestamp)
                             throws javax.jms.JMSException
        Set the message timestamp.

        Providers set this field when a message is sent. This operation can be used to change the value of a message that's been received.

        Specified by:
        setJMSTimestamp in interface javax.jms.Message
        Parameters:
        timestamp - the timestamp for this message
        Throws:
        javax.jms.JMSException - if JMS fails to set the timestamp due to some internal JMS error.
        See Also:
        Message.getJMSTimestamp()
      • getJMSCorrelationIDAsBytes

        public byte[] getJMSCorrelationIDAsBytes()
                                          throws javax.jms.JMSException
        Get the correlation ID as an array of bytes for the message.

        The use of a byte[] value for JMSCorrelationID is non-portable.

        Specified by:
        getJMSCorrelationIDAsBytes in interface javax.jms.Message
        Returns:
        the correlation ID of a message as an array of bytes.
        Throws:
        javax.jms.JMSException - if JMS fails to get correlationId due to some internal JMS error.
      • setJMSCorrelationIDAsBytes

        public void setJMSCorrelationIDAsBytes​(byte[] correlationID)
                                        throws javax.jms.JMSException
        Set the correlation ID as an array of bytes for the message.

        If a provider supports the native concept of correlation id, a JMS client may need to assign specific JMSCorrelationID values to match those expected by non-JMS clients. JMS providers without native correlation id values are not required to support this (and the corresponding get) method; their implementation may throw java.lang.UnsupportedOperationException).

        The use of a byte[] value for JMSCorrelationID is non-portable.

        Specified by:
        setJMSCorrelationIDAsBytes in interface javax.jms.Message
        Parameters:
        correlationID - the correlation ID value as an array of bytes.
        Throws:
        javax.jms.JMSException - if JMS fails to set correlationId due to some internal JMS error.
      • getJMSCorrelationID

        public java.lang.String getJMSCorrelationID()
                                             throws javax.jms.JMSException
        Get the correlation ID for the message.

        This method is used to return correlation id values that are either provider-specific message ID's or application-specific Strings.

        Specified by:
        getJMSCorrelationID in interface javax.jms.Message
        Returns:
        the correlation ID of a message as a String.
        Throws:
        javax.jms.JMSException - if JMS fails to get correlationId due to some internal JMS error.
      • setJMSCorrelationID

        public void setJMSCorrelationID​(java.lang.String correlationID)
                                 throws javax.jms.JMSException
        Set the correlation ID for the message.

        A client can use the JMSCorrelationID header field to link one message with another. A typically use is to link a response message with its request message.

        JMSCorrelationID can hold one of the following:

        • A provider-specific message ID
        • An application-specific String
        • A provider-native byte[] value.

        Since each message sent by a JMS provider is assigned a message ID value it is convenient to link messages via message ID. All message ID values must start with the `ID:' prefix.

        In some cases, an application (made up of several clients) needs to use an application specific value for linking messages. For instance, an application may use JMSCorrelationID to hold a value referencing some external information. Application specified values must not start with the `ID:' prefix; this is reserved for provider-generated message ID values.

        If a provider supports the native concept of correlation ID, a JMS client may need to assign specific JMSCorrelationID values to match those expected by non-JMS clients. A byte[] value is used for this purpose. JMS providers without native correlation ID values are not required to support byte[] values. The use of a byte[] value for JMSCorrelationID is non-portable.

        Specified by:
        setJMSCorrelationID in interface javax.jms.Message
        Parameters:
        correlationID - the message ID of a message being referred to.
        Throws:
        javax.jms.JMSException - if JMS fails to set correlationId due to some internal JMS error.
      • getJMSReplyTo

        public javax.jms.Destination getJMSReplyTo()
                                            throws javax.jms.JMSException
        Get where a reply to this message should be sent.
        Specified by:
        getJMSReplyTo in interface javax.jms.Message
        Returns:
        where to send a response to this message
        Throws:
        javax.jms.JMSException - if JMS fails to get ReplyTo Destination due to some internal JMS error.
      • setJMSReplyTo

        public void setJMSReplyTo​(javax.jms.Destination replyTo)
                           throws javax.jms.JMSException
        Set where a reply to this message should be sent.

        The replyTo header field contains the destination where a reply to the current message should be sent. If it is null no reply is expected. The destination may be either a Queue or a Topic.

        Messages with a null replyTo value are called JMS datagrams. Datagrams may be a notification of some change in the sender (i.e. they signal a sender event) or they may just be some data the sender thinks is of interest.

        Messages with a replyTo value are typically expecting a response. A response may be optional, it is up to the client to decide. These messages are called JMS requests. A message sent in response to a request is called a reply.

        In some cases a client may wish to match up a request it sent earlier with a reply it has just received. This can be done using the correlationID.

        Specified by:
        setJMSReplyTo in interface javax.jms.Message
        Parameters:
        replyTo - where to send a response to this message
        Throws:
        javax.jms.JMSException - if JMS fails to set ReplyTo Destination due to some internal JMS error.
        See Also:
        Message.getJMSReplyTo()
      • getJMSDestination

        public javax.jms.Destination getJMSDestination()
                                                throws javax.jms.JMSException
        Get the destination for this message.

        The destination field contains the destination to which the message is being sent.

        When a message is sent this value is ignored. After completion of the send method it holds the destination specified by the send.

        When a message is received, its destination value must be equivalent to the value assigned when it was sent.

        Specified by:
        getJMSDestination in interface javax.jms.Message
        Returns:
        the destination of this message.
        Throws:
        javax.jms.JMSException - if JMS fails to get JMS Destination due to some internal JMS error.
      • setJMSDestination

        public void setJMSDestination​(javax.jms.Destination destination)
                               throws javax.jms.JMSException
        Set the destination for this message.

        Providers set this field when a message is sent. This operation can be used to change the value of a message that's been received.

        Specified by:
        setJMSDestination in interface javax.jms.Message
        Parameters:
        destination - the destination for this message.
        Throws:
        javax.jms.JMSException - if JMS fails to set JMS Destination due to some internal JMS error.
        See Also:
        Message.getJMSDestination()
      • getJMSDeliveryMode

        public int getJMSDeliveryMode()
                               throws javax.jms.JMSException
        Get the delivery mode for this message.
        Specified by:
        getJMSDeliveryMode in interface javax.jms.Message
        Returns:
        the delivery mode of this message.
        Throws:
        javax.jms.JMSException - if JMS fails to get JMS DeliveryMode due to some internal JMS error.
        See Also:
        DeliveryMode
      • setJMSDeliveryMode

        public void setJMSDeliveryMode​(int deliveryMode)
                                throws javax.jms.JMSException
        Set the delivery mode for this message.

        Providers set this field when a message is sent. This operation can be used to change the value of a message that's been received.

        Specified by:
        setJMSDeliveryMode in interface javax.jms.Message
        Parameters:
        deliveryMode - the delivery mode for this message.
        Throws:
        javax.jms.JMSException - if JMS fails to set JMS DeliveryMode due to some internal JMS error.
        See Also:
        Message.getJMSDeliveryMode(), DeliveryMode
      • getJMSRedelivered

        public boolean getJMSRedelivered()
                                  throws javax.jms.JMSException
        Get an indication of whether this message is being redelivered.

        If a client receives a message with the redelivered indicator set, it is likely, but not guaranteed, that this message was delivered to the client earlier but the client did not acknowledge its receipt at that earlier time.

        Specified by:
        getJMSRedelivered in interface javax.jms.Message
        Returns:
        set to true if this message is being redelivered.
        Throws:
        javax.jms.JMSException - if JMS fails to get JMS Redelivered flag due to some internal JMS error.
      • setJMSRedelivered

        public void setJMSRedelivered​(boolean redelivered)
                               throws javax.jms.JMSException
        Set to indicate whether this message is being redelivered.

        This field is set at the time the message is delivered. This operation can be used to change the value of a message that's been received.

        Specified by:
        setJMSRedelivered in interface javax.jms.Message
        Parameters:
        redelivered - an indication of whether this message is being redelivered.
        Throws:
        javax.jms.JMSException - if JMS fails to set JMS Redelivered flag due to some internal JMS error.
        See Also:
        Message.getJMSRedelivered()
      • getJMSType

        public java.lang.String getJMSType()
                                    throws javax.jms.JMSException
        Get the message type.
        Specified by:
        getJMSType in interface javax.jms.Message
        Returns:
        the message type
        Throws:
        javax.jms.JMSException - if JMS fails to get JMS message type due to some internal JMS error.
      • setJMSType

        public void setJMSType​(java.lang.String type)
                        throws javax.jms.JMSException
        Set the message type.

        Some JMS providers use a message repository that contains the definition of messages sent by applications. The type header field contains the name of a message's definition.

        JMS does not define a standard message definition repository nor does it define a naming policy for the definitions it contains. JMS clients should use symbolic values for type that can be configured at installation time to the values defined in the current providers message repository.

        JMS clients should assign a value to type whether the application makes use of it or not. This insures that it is properly set for those providers that require it.

        Specified by:
        setJMSType in interface javax.jms.Message
        Parameters:
        type - the class of message
        Throws:
        javax.jms.JMSException - if JMS fails to set JMS message type due to some internal JMS error.
        See Also:
        Message.getJMSType()
      • getJMSExpiration

        public long getJMSExpiration()
                              throws javax.jms.JMSException
        Get the message's expiration value.

        When a message is sent, expiration is left unassigned. After completion of the send method, it holds the expiration time of the message. This is the sum of the time-to-live value specified by the client and the GMT at the time of the send.

        If the time-to-live is specified as zero, expiration is set to zero which indicates the message does not expire.

        When a message's expiration time is reached, a provider should discard it. JMS does not define any form of notification of message expiration.

        Clients should not receive messages that have expired; however, JMS does not guarantee that this will not happen.

        Specified by:
        getJMSExpiration in interface javax.jms.Message
        Returns:
        the time the message expires. It is the sum of the time-to-live value specified by the client, and the GMT at the time of the send.
        Throws:
        javax.jms.JMSException - if JMS fails to get JMS message expiration due to some internal JMS error.
      • setJMSExpiration

        public void setJMSExpiration​(long expiration)
                              throws javax.jms.JMSException
        Set the message's expiration value.

        Providers set this field when a message is sent. This operation can be used to change the value of a message that's been received.

        Specified by:
        setJMSExpiration in interface javax.jms.Message
        Parameters:
        expiration - the message's expiration time
        Throws:
        javax.jms.JMSException - if JMS fails to set JMS message expiration due to some internal JMS error.
        See Also:
        Message.getJMSExpiration()
      • getJMSPriority

        public int getJMSPriority()
                           throws javax.jms.JMSException
        Get the message priority.

        JMS defines a ten level priority value with 0 as the lowest priority and 9 as the highest. In addition, clients should consider priorities 0-4 as gradations of normal priority and priorities 5-9 as gradations of expedited priority.

        JMS does not require that a provider strictly implement priority ordering of messages; however, it should do its best to deliver expedited messages ahead of normal messages.

        Specified by:
        getJMSPriority in interface javax.jms.Message
        Returns:
        the default message priority
        Throws:
        javax.jms.JMSException - if JMS fails to get JMS message priority due to some internal JMS error.
      • setJMSPriority

        public void setJMSPriority​(int priority)
                            throws javax.jms.JMSException
        Set the priority for this message.

        Providers set this field when a message is sent. This operation can be used to change the value of a message that's been received.

        Specified by:
        setJMSPriority in interface javax.jms.Message
        Parameters:
        priority - the priority of this message
        Throws:
        javax.jms.JMSException - if JMS fails to set JMS message priority due to some internal JMS error.
        See Also:
        Message.getJMSPriority()
      • clearProperties

        public void clearProperties()
                             throws javax.jms.JMSException
        Clear a message's properties.
        Specified by:
        clearProperties in interface javax.jms.Message
        Throws:
        javax.jms.JMSException - if JMS fails to clear JMS message properties due to some internal JMS error.
      • propertyExists

        public boolean propertyExists​(java.lang.String name)
                               throws javax.jms.JMSException
        Check if a property value exists.
        Specified by:
        propertyExists in interface javax.jms.Message
        Parameters:
        name - the name of the property to test
        Returns:
        true if the property does exist.
        Throws:
        javax.jms.JMSException - if JMS fails to check if property exists due to some internal JMS error.
      • getBooleanProperty

        public boolean getBooleanProperty​(java.lang.String name)
                                   throws javax.jms.JMSException
        Return the boolean property value with the given name.
        Specified by:
        getBooleanProperty in interface javax.jms.Message
        Parameters:
        name - the name of the boolean property
        Returns:
        the boolean property value with the given name.
        Throws:
        javax.jms.JMSException - if JMS fails to get Property due to some internal JMS error.
        javax.jms.MessageFormatException - if this type conversion is invalid.
      • getByteProperty

        public byte getByteProperty​(java.lang.String name)
                             throws javax.jms.JMSException
        Return the byte property value with the given name.
        Specified by:
        getByteProperty in interface javax.jms.Message
        Parameters:
        name - the name of the byte property
        Returns:
        the byte property value with the given name.
        Throws:
        javax.jms.JMSException - if JMS fails to get Property due to some internal JMS error.
        javax.jms.MessageFormatException - if this type conversion is invalid.
      • getShortProperty

        public short getShortProperty​(java.lang.String name)
                               throws javax.jms.JMSException
        Return the short property value with the given name.
        Specified by:
        getShortProperty in interface javax.jms.Message
        Parameters:
        name - the name of the short property
        Returns:
        the short property value with the given name.
        Throws:
        javax.jms.JMSException - if JMS fails to get Property due to some internal JMS error.
        javax.jms.MessageFormatException - if this type conversion is invalid.
      • getIntProperty

        public int getIntProperty​(java.lang.String name)
                           throws javax.jms.JMSException
        Return the integer property value with the given name.
        Specified by:
        getIntProperty in interface javax.jms.Message
        Parameters:
        name - the name of the integer property
        Returns:
        the integer property value with the given name.
        Throws:
        javax.jms.JMSException - if JMS fails to get Property due to some internal JMS error.
        javax.jms.MessageFormatException - if this type conversion is invalid.
      • getLongProperty

        public long getLongProperty​(java.lang.String name)
                             throws javax.jms.JMSException
        Return the long property value with the given name.
        Specified by:
        getLongProperty in interface javax.jms.Message
        Parameters:
        name - the name of the long property
        Returns:
        the long property value with the given name.
        Throws:
        javax.jms.JMSException - if JMS fails to get Property due to some internal JMS error.
        javax.jms.MessageFormatException - if this type conversion is invalid.
      • getFloatProperty

        public float getFloatProperty​(java.lang.String name)
                               throws javax.jms.JMSException
        Return the float property value with the given name.
        Specified by:
        getFloatProperty in interface javax.jms.Message
        Parameters:
        name - the name of the float property
        Returns:
        the float property value with the given name.
        Throws:
        javax.jms.JMSException - if JMS fails to get Property due to some internal JMS error.
        javax.jms.MessageFormatException - if this type conversion is invalid.
      • getDoubleProperty

        public double getDoubleProperty​(java.lang.String name)
                                 throws javax.jms.JMSException
        Return the double property value with the given name.
        Specified by:
        getDoubleProperty in interface javax.jms.Message
        Parameters:
        name - the name of the double property
        Returns:
        the double property value with the given name.
        Throws:
        javax.jms.JMSException - if JMS fails to get Property due to some internal JMS error.
        javax.jms.MessageFormatException - if this type conversion is invalid.
      • getStringProperty

        public java.lang.String getStringProperty​(java.lang.String name)
                                           throws javax.jms.JMSException
        Return the String property value with the given name.
        Specified by:
        getStringProperty in interface javax.jms.Message
        Parameters:
        name - the name of the String property
        Returns:
        the String property value with the given name. If there is no property by this name, a null value is returned.
        Throws:
        javax.jms.JMSException - if JMS fails to get Property due to some internal JMS error.
        javax.jms.MessageFormatException - if this type conversion is invalid.
      • getObjectProperty

        public java.lang.Object getObjectProperty​(java.lang.String name)
                                           throws javax.jms.JMSException
        Return the Java object property value with the given name.

        Note that this method can be used to return in objectified format, an object that had been stored as a property in the Message with the equivalent setObject method call, or it's equivalent primitive set method.

        Specified by:
        getObjectProperty in interface javax.jms.Message
        Parameters:
        name - the name of the Java object property
        Returns:
        the Java object property value with the given name, in objectified format (ie. if it set as an int, then a Integer is returned). If there is no property by this name, a null value is returned.
        Throws:
        javax.jms.JMSException - if JMS fails to get Property due to some internal JMS error.
      • getPropertyNames

        public java.util.Enumeration getPropertyNames()
                                               throws javax.jms.JMSException
        Return an Enumeration of all the property names.
        Specified by:
        getPropertyNames in interface javax.jms.Message
        Returns:
        an enumeration of all the names of property values.
        Throws:
        javax.jms.JMSException - if JMS fails to get Property names due to some internal JMS error.
      • setBooleanProperty

        public void setBooleanProperty​(java.lang.String name,
                                       boolean value)
                                throws javax.jms.JMSException
        Set a boolean property value with the given name, into the Message.
        Specified by:
        setBooleanProperty in interface javax.jms.Message
        Parameters:
        name - the name of the boolean property
        value - the boolean property value to set in the Message.
        Throws:
        javax.jms.JMSException - if JMS fails to set Property due to some internal JMS error.
        javax.jms.MessageNotWriteableException - if properties are read-only
      • setByteProperty

        public void setByteProperty​(java.lang.String name,
                                    byte value)
                             throws javax.jms.JMSException
        Set a byte property value with the given name, into the Message.
        Specified by:
        setByteProperty in interface javax.jms.Message
        Parameters:
        name - the name of the byte property
        value - the byte property value to set in the Message.
        Throws:
        javax.jms.JMSException - if JMS fails to set Property due to some internal JMS error.
        javax.jms.MessageNotWriteableException - if properties are read-only
      • setShortProperty

        public void setShortProperty​(java.lang.String name,
                                     short value)
                              throws javax.jms.JMSException
        Set a short property value with the given name, into the Message.
        Specified by:
        setShortProperty in interface javax.jms.Message
        Parameters:
        name - the name of the short property
        value - the short property value to set in the Message.
        Throws:
        javax.jms.JMSException - if JMS fails to set Property due to some internal JMS error.
        javax.jms.MessageNotWriteableException - if properties are read-only
      • setIntProperty

        public void setIntProperty​(java.lang.String name,
                                   int value)
                            throws javax.jms.JMSException
        Set an integer property value with the given name, into the Message.
        Specified by:
        setIntProperty in interface javax.jms.Message
        Parameters:
        name - the name of the integer property
        value - the integer property value to set in the Message.
        Throws:
        javax.jms.JMSException - if JMS fails to set Property due to some internal JMS error.
        javax.jms.MessageNotWriteableException - if properties are read-only
      • setLongProperty

        public void setLongProperty​(java.lang.String name,
                                    long value)
                             throws javax.jms.JMSException
        Set a long property value with the given name, into the Message.
        Specified by:
        setLongProperty in interface javax.jms.Message
        Parameters:
        name - the name of the long property
        value - the long property value to set in the Message.
        Throws:
        javax.jms.JMSException - if JMS fails to set Property due to some internal JMS error.
        javax.jms.MessageNotWriteableException - if properties are read-only
      • setFloatProperty

        public void setFloatProperty​(java.lang.String name,
                                     float value)
                              throws javax.jms.JMSException
        Set a float property value with the given name, into the Message.
        Specified by:
        setFloatProperty in interface javax.jms.Message
        Parameters:
        name - the name of the float property
        value - the float property value to set in the Message.
        Throws:
        javax.jms.JMSException - if JMS fails to set Property due to some internal JMS error.
        javax.jms.MessageNotWriteableException - if properties are read-only
      • setDoubleProperty

        public void setDoubleProperty​(java.lang.String name,
                                      double value)
                               throws javax.jms.JMSException
        Set a double property value with the given name, into the Message.
        Specified by:
        setDoubleProperty in interface javax.jms.Message
        Parameters:
        name - the name of the double property
        value - the double property value to set in the Message.
        Throws:
        javax.jms.JMSException - if JMS fails to set Property due to some internal JMS error.
        javax.jms.MessageNotWriteableException - if properties are read-only
      • setStringProperty

        public void setStringProperty​(java.lang.String name,
                                      java.lang.String value)
                               throws javax.jms.JMSException
        Set a String property value with the given name, into the Message.
        Specified by:
        setStringProperty in interface javax.jms.Message
        Parameters:
        name - the name of the String property
        value - the String property value to set in the Message.
        Throws:
        javax.jms.JMSException - if JMS fails to set Property due to some internal JMS error.
        javax.jms.MessageNotWriteableException - if properties are read-only
      • setObjectProperty

        public void setObjectProperty​(java.lang.String name,
                                      java.lang.Object value)
                               throws javax.jms.JMSException
        Set a Java object property value with the given name, into the Message.

        Note that this method only works for the objectified primitive object types (Integer, Double, Long ...) and String's.

        Specified by:
        setObjectProperty in interface javax.jms.Message
        Parameters:
        name - the name of the Java object property.
        value - the Java object property value to set in the Message.
        Throws:
        javax.jms.JMSException - if JMS fails to set Property due to some internal JMS error.
        javax.jms.MessageFormatException - if object is invalid
        javax.jms.MessageNotWriteableException - if properties are read-only
      • acknowledge

        public void acknowledge()
                         throws javax.jms.JMSException
        Acknowledge this and all previous messages received.

        All JMS messages support the acknowledge() method for use when a client has specified that a JMS consumers messages are to be explicitly acknowledged.

        JMS defaults to implicit message acknowledgement. In this mode, calls to acknowledge() are ignored.

        Acknowledgment of a message automatically acknowledges all messages previously received by the consumer. Clients may individually acknowledge messages or they may choose to acknowledge messages in application defined groups (which is done by acknowledging the last received message in the group).

        Messages that have been received but not acknowledged may be redelivered to the consumer.

        Specified by:
        acknowledge in interface javax.jms.Message
        Throws:
        javax.jms.JMSException - if JMS fails to acknowledge due to some internal JMS error.
      • clearBody

        public void clearBody()
                       throws javax.jms.JMSException
        Clear out the message body. All other parts of the message are left untouched.
        Specified by:
        clearBody in interface javax.jms.Message
        Throws:
        javax.jms.JMSException - if JMS fails to due to some internal JMS error.
      • reset

        public void reset()
                   throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object