Interface WmMessage

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String WM_JMS_CLUSTER_NODES  
      static java.lang.String WM_JMS_CLUSTER_NODES_DELIMITER  
      • Fields inherited from interface javax.jms.Message

        DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void explicitAcknowledge()
      Explicitly acknowledges this and only this consumed message.
      boolean getCompression()
      Get whether compression is enabled or disabled for this message.
      int getCompressionLevel()
      Get the compression level for this message.
      int getCompressionRatio()
      Get the compression ratio of a delivered message that has been compressed.
      int getSize()
      Get the message size in bytes.
      void negativeAcknowledge()
      Negatively acknowledges this consumed message causing it to be redelivered.
      void setAccessLabel​(short[] label)
      Set access label to message envelope
      void setCompression​(boolean compress)
      Enable or disable compression for this message.
      void setCompressionLevel​(int level)
      Set the compression level for this message.
      • Methods inherited from interface javax.jms.Message

        acknowledge, clearBody, clearProperties, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty
    • Field Detail

      • WM_JMS_CLUSTER_NODES

        static final java.lang.String WM_JMS_CLUSTER_NODES
        See Also:
        Constant Field Values
      • WM_JMS_CLUSTER_NODES_DELIMITER

        static final java.lang.String WM_JMS_CLUSTER_NODES_DELIMITER
        See Also:
        Constant Field Values
    • Method Detail

      • explicitAcknowledge

        void explicitAcknowledge()
                          throws javax.jms.JMSException
        Explicitly acknowledges this and only this consumed message.

        Calls to explicitAcknowledge are ignored for both transacted sessions and sessions specified to use implicit acknowledgement modes.

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

        Throws:
        javax.jms.JMSException - if the JMS provider fails to acknowledge the message due to some internal error.
        javax.jms.IllegalStateException - if this method is called on a closed session.
        See Also:
        Session.CLIENT_ACKNOWLEDGE
      • negativeAcknowledge

        void negativeAcknowledge()
                          throws javax.jms.JMSException
        Negatively acknowledges this consumed message causing it to be redelivered.

        Calls to negativeAcknowledge are ignored for both transacted sessions and sessions specified to use implicit acknowledgement modes.

        Throws:
        javax.jms.JMSException - if the JMS provider fails to negative acknowledge the message due to some internal error.
        javax.jms.IllegalStateException - if this method is called on a closed session.
        See Also:
        Session.CLIENT_ACKNOWLEDGE
      • getSize

        int getSize()
             throws javax.jms.JMSException
        Get the message size in bytes.
        Returns:
        The message size in bytes.
        Throws:
        javax.jms.JMSException - for any internal errors.
      • setCompression

        void setCompression​(boolean compress)
                     throws javax.jms.JMSException
        Enable or disable compression for this message. When enabled, the message body will be compressed just prior to being delivered.
        Parameters:
        compress - true to enable compression for this message.
        Throws:
        javax.jms.JMSException - for any internal errors.
      • getCompression

        boolean getCompression()
                        throws javax.jms.JMSException
        Get whether compression is enabled or disabled for this message.
        Returns:
        Whether compression is enabled or disabled for this message.
        Throws:
        javax.jms.JMSException - for any internal errors.
      • setCompressionLevel

        void setCompressionLevel​(int level)
                          throws javax.jms.JMSException
        Set the compression level for this message.
        Parameters:
        level - The compression level (0-9) as defined by java.util.zip.Deflater.
        Throws:
        javax.jms.JMSException - for any internal errors.
      • getCompressionLevel

        int getCompressionLevel()
                         throws javax.jms.JMSException
        Get the compression level for this message.
        Returns:
        The compression level (0-9) as defined by java.util.zip.Deflater.
        Throws:
        javax.jms.JMSException - for any internal errors.
      • getCompressionRatio

        int getCompressionRatio()
                         throws javax.jms.JMSException
        Get the compression ratio of a delivered message that has been compressed. The ratio is calculated as:
         ratio = ((uncompressed_size - compressed_size) / uncompressed_size) * 100
         
        Returns:
        The compression ratio of a delivered message.
        Throws:
        javax.jms.JMSException - for any internal errors.
      • setAccessLabel

        void setAccessLabel​(short[] label)
                     throws javax.jms.JMSException
        Set access label to message envelope
        Parameters:
        label -
        Throws:
        javax.jms.JMSException