Class AMQPStandardMessage

  • All Implemented Interfaces:
    org.apache.activemq.artemis.api.core.Message

    public class AMQPStandardMessage
    extends AMQPMessage
    • Field Detail

      • data

        protected org.apache.qpid.proton.codec.ReadableBuffer data
    • Constructor Detail

      • AMQPStandardMessage

        public AMQPStandardMessage​(long messageFormat,
                                   byte[] data,
                                   org.apache.activemq.artemis.utils.collections.TypedProperties extraProperties)
        Creates a new AMQPStandardMessage instance from binary encoded message data.
        Parameters:
        messageFormat - The Message format tag given the in Transfer that carried this message
        data - The encoded AMQP message
        extraProperties - Broker specific extra properties that should be carried with this message
      • AMQPStandardMessage

        public AMQPStandardMessage​(long messageFormat,
                                   byte[] data,
                                   org.apache.activemq.artemis.utils.collections.TypedProperties extraProperties,
                                   org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools coreMessageObjectPools)
        Creates a new AMQPStandardMessage instance from binary encoded message data.
        Parameters:
        messageFormat - The Message format tag given the in Transfer that carried this message
        data - The encoded AMQP message
        extraProperties - Broker specific extra properties that should be carried with this message
        coreMessageObjectPools - Object pool used to accelerate some String operations.
      • AMQPStandardMessage

        public AMQPStandardMessage​(long messageFormat,
                                   org.apache.qpid.proton.codec.ReadableBuffer data,
                                   org.apache.activemq.artemis.utils.collections.TypedProperties extraProperties,
                                   org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools coreMessageObjectPools)
        Creates a new AMQPStandardMessage instance from binary encoded message data.
        Parameters:
        messageFormat - The Message format tag given the in Transfer that carried this message
        data - The encoded AMQP message in an ReadableBuffer wrapper.
        extraProperties - Broker specific extra properties that should be carried with this message
        coreMessageObjectPools - Object pool used to accelerate some String operations.
    • Method Detail

      • createMessage

        public static AMQPStandardMessage createMessage​(long messageID,
                                                        long messageFormat,
                                                        org.apache.activemq.artemis.api.core.SimpleString replyTo,
                                                        org.apache.qpid.proton.amqp.messaging.Header header,
                                                        org.apache.qpid.proton.amqp.messaging.Properties properties,
                                                        java.util.Map<org.apache.qpid.proton.amqp.Symbol,​java.lang.Object> daMap,
                                                        java.util.Map<org.apache.qpid.proton.amqp.Symbol,​java.lang.Object> maMap,
                                                        java.util.Map<java.lang.String,​java.lang.Object> apMap,
                                                        java.util.Map<org.apache.qpid.proton.amqp.Symbol,​java.lang.Object> footerMap,
                                                        org.apache.qpid.proton.amqp.messaging.Section body)
      • copy

        public org.apache.activemq.artemis.api.core.Message copy()
        Specified by:
        copy in interface org.apache.activemq.artemis.api.core.Message
        Specified by:
        copy in class AMQPMessage
      • getEncodeSize

        public int getEncodeSize()
        Specified by:
        getEncodeSize in interface org.apache.activemq.artemis.api.core.Message
        Specified by:
        getEncodeSize in class AMQPMessage
      • getData

        protected org.apache.qpid.proton.codec.ReadableBuffer getData()
        Specified by:
        getData in class AMQPMessage
      • getMemoryEstimate

        public int getMemoryEstimate()
        Specified by:
        getMemoryEstimate in interface org.apache.activemq.artemis.api.core.Message
        Specified by:
        getMemoryEstimate in class AMQPMessage
      • persist

        public void persist​(org.apache.activemq.artemis.api.core.ActiveMQBuffer targetRecord)
        Specified by:
        persist in interface org.apache.activemq.artemis.api.core.Message
        Specified by:
        persist in class AMQPMessage
      • copy

        public final org.apache.activemq.artemis.api.core.Message copy​(long newID)
      • getPersistSize

        public int getPersistSize()
        Specified by:
        getPersistSize in interface org.apache.activemq.artemis.api.core.Message
        Specified by:
        getPersistSize in class AMQPMessage
      • reloadPersistence

        public void reloadPersistence​(org.apache.activemq.artemis.api.core.ActiveMQBuffer record,
                                      org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools pools)
        Specified by:
        reloadPersistence in interface org.apache.activemq.artemis.api.core.Message
        Specified by:
        reloadPersistence in class AMQPMessage
      • getPersistentSize

        public long getPersistentSize()
                               throws org.apache.activemq.artemis.api.core.ActiveMQException
        Specified by:
        getPersistentSize in interface org.apache.activemq.artemis.api.core.Message
        Specified by:
        getPersistentSize in class AMQPMessage
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • getPersister

        public org.apache.activemq.artemis.core.persistence.Persister<org.apache.activemq.artemis.api.core.Message> getPersister()
        Specified by:
        getPersister in interface org.apache.activemq.artemis.api.core.Message
        Specified by:
        getPersister in class AMQPMessage
      • reencode

        public void reencode()
        Specified by:
        reencode in interface org.apache.activemq.artemis.api.core.Message
        Specified by:
        reencode in class AMQPMessage
      • getStringBody

        public java.lang.String getStringBody()