Class AMQPMessage

  • All Implemented Interfaces:
    org.apache.activemq.artemis.api.core.Message
    Direct Known Subclasses:
    AMQPLargeMessage, AMQPStandardMessage

    public abstract class AMQPMessage
    extends org.apache.activemq.artemis.api.core.RefCountMessage
    implements org.apache.activemq.artemis.api.core.Message
    See AMQP v1.0 message format
    
                                                          Bare Message
                                                                |
                                          .---------------------+--------------------.
                                          |                                          |
     +--------+-------------+-------------+------------+--------------+--------------+--------+
     | header | delivery-   | message-    | properties | application- | application- | footer |
     |        | annotations | annotations |            | properties   | data         |        |
     +--------+-------------+-------------+------------+--------------+--------------+--------+
     |                                                                                        |
     '-------------------------------------------+--------------------------------------------'
                                                 |
                                          Annotated Message
     
    • Zero or one header sections.
    • Zero or one delivery-annotation sections.
    • Zero or one message-annotation sections.
    • Zero or one properties sections.
    • Zero or one application-properties sections.
    • The body consists of one of the following three choices:
      • one or more data sections
      • one or more amqp-sequence sections
      • or a single amqp-value section.
    • Zero or one footer sections.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AMQPMessage.MessageDataScanningStatus
      This has been made public just for testing purposes: it's not stable and developers shouldn't rely on this for developing purposes.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AMQPMessage​(long messageFormat)  
        AMQPMessage​(long messageFormat, org.apache.activemq.artemis.utils.collections.TypedProperties extraProperties, org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools coreMessageObjectPools)
      Creates a new AMQPMessage instance from binary encoded message data.
      protected AMQPMessage​(AMQPMessage copy)  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean acceptsConsumer​(long consumer)  
      protected static void addAnnotationsAsProperties​(java.lang.String prefix, java.util.Map map, org.apache.qpid.proton.amqp.messaging.MessageAnnotations annotations)  
      protected org.apache.activemq.artemis.api.core.SimpleString cachedAddressSimpleString​(java.lang.String address)  
      void clearInternalProperties()  
      boolean containsProperty​(java.lang.String key)  
      boolean containsProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      abstract org.apache.activemq.artemis.api.core.Message copy()  
      protected org.apache.qpid.proton.codec.ReadableBuffer createDeliveryCopy​(int deliveryCount, org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations)
      it will create a copy with the relevant delivery annotation and its copy
      org.apache.activemq.artemis.utils.collections.TypedProperties createExtraProperties()  
      protected abstract void encodeMessage()  
      protected abstract void ensureDataIsValid()  
      protected void ensureMessageDataScanned()  
      protected void ensureScanning()  
      java.lang.String getAddress()  
      org.apache.activemq.artemis.api.core.SimpleString getAddressSimpleString()  
      java.lang.Object getAMQPUserID()
      Before we added AMQP into Artemis the name getUserID was already taken by JMSMessageID.
      java.lang.Object getAnnotation​(org.apache.activemq.artemis.api.core.SimpleString key)  
      org.apache.qpid.proton.amqp.messaging.ApplicationProperties getApplicationProperties()
      Returns a copy of the ApplicationProperties present in the message if present or null.
      protected java.util.Map<java.lang.String,​java.lang.Object> getApplicationPropertiesMap​(boolean createIfAbsent)  
      org.apache.qpid.proton.amqp.messaging.Section getBody()
      Retrieves the AMQP Section that composes the body of this message by decoding a fresh copy from the encoded message data.
      java.lang.Boolean getBooleanProperty​(java.lang.String key)  
      java.lang.Boolean getBooleanProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      java.lang.Object getBrokerProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      java.lang.Byte getByteProperty​(java.lang.String key)  
      java.lang.Byte getByteProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      byte[] getBytesProperty​(java.lang.String key)  
      byte[] getBytesProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      java.lang.String getConnectionID()  
      java.lang.Object getCorrelationID()  
      protected abstract org.apache.qpid.proton.codec.ReadableBuffer getData()  
      AMQPMessage.MessageDataScanningStatus getDataScanningStatus()  
      protected org.apache.qpid.proton.amqp.messaging.ApplicationProperties getDecodedApplicationProperties()
      This will return application properties without attempting to decode it.
      protected org.apache.qpid.proton.amqp.messaging.MessageAnnotations getDecodedMessageAnnotations()  
      org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations getDeliveryAnnotations()
      Returns a copy of the MessageAnnotations in the message if present or null.
      protected int getDeliveryAnnotationsForSendBufferSize()  
      java.lang.Double getDoubleProperty​(java.lang.String key)  
      java.lang.Double getDoubleProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      java.lang.Object getDuplicateProperty()  
      abstract int getEncodeSize()  
      protected int getEstimateSavedEncode()  
      long getExpiration()  
      byte[] getExtraBytesProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      org.apache.activemq.artemis.utils.collections.TypedProperties getExtraProperties()  
      java.lang.Float getFloatProperty​(java.lang.String key)  
      java.lang.Float getFloatProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      org.apache.qpid.proton.amqp.messaging.Footer getFooter()
      Retrieves the AMQP Footer encoded in the data of this message by decoding a fresh copy from the encoded message data.
      org.apache.activemq.artemis.api.core.SimpleString getGroupID()  
      int getGroupSequence()  
      org.apache.qpid.proton.amqp.messaging.Header getHeader()
      Returns a copy of the message Header if one is present, changes to the returned Header instance do not affect the original Message.
      java.lang.Long getIngressTimestamp()  
      java.lang.Integer getIntProperty​(java.lang.String key)  
      java.lang.Integer getIntProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      org.apache.activemq.artemis.api.core.SimpleString getLastValueProperty()  
      java.lang.Long getLongProperty​(java.lang.String key)  
      java.lang.Long getLongProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      abstract int getMemoryEstimate()  
      protected java.lang.Object getMessageAnnotation​(java.lang.String annotation)  
      protected java.lang.Object getMessageAnnotation​(org.apache.qpid.proton.amqp.Symbol annotation)  
      org.apache.qpid.proton.amqp.messaging.MessageAnnotations getMessageAnnotations()
      Returns a copy of the DeliveryAnnotations in the message if present or null.
      protected java.util.Map<org.apache.qpid.proton.amqp.Symbol,​java.lang.Object> getMessageAnnotationsMap​(boolean createIfAbsent)  
      long getMessageFormat()  
      long getMessageID()  
      java.lang.Object getObjectProperty​(java.lang.String key)  
      java.lang.Object getObjectProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      java.lang.Object getObjectPropertyForFilter​(org.apache.activemq.artemis.api.core.SimpleString key)  
      java.lang.Object getOwner()  
      abstract long getPersistentSize()  
      abstract org.apache.activemq.artemis.core.persistence.Persister<org.apache.activemq.artemis.api.core.Message> getPersister()  
      abstract int getPersistSize()  
      byte getPriority()  
      org.apache.qpid.proton.amqp.messaging.Properties getProperties()
      Returns a copy of the message Properties if one is present, changes to the returned Properties instance do not affect the original Message.
      protected org.apache.activemq.artemis.api.core.SimpleString.StringSimpleStringPool getPropertyKeysPool()  
      java.util.Set<org.apache.activemq.artemis.api.core.SimpleString> getPropertyNames()  
      protected org.apache.activemq.artemis.api.core.SimpleString.StringSimpleStringPool getPropertyValuesPool()  
      java.lang.String getProtocolName()  
      org.apache.qpid.proton.message.impl.MessageImpl getProtonMessage()
      Creates and returns a Proton-J MessageImpl wrapper around the message data.
      org.apache.activemq.artemis.api.core.SimpleString getReplyTo()  
      org.apache.activemq.artemis.api.core.RoutingType getRoutingType()  
      java.lang.Long getScheduledDeliveryTime()  
      org.apache.qpid.proton.codec.ReadableBuffer getSendBuffer​(int deliveryCount, org.apache.activemq.artemis.core.server.MessageReference reference)
      Gets a ByteBuf from the Message that contains the encoded bytes to be sent on the wire.
      java.lang.Short getShortProperty​(java.lang.String key)  
      java.lang.Short getShortProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      org.apache.activemq.artemis.api.core.SimpleString getSimpleStringProperty​(java.lang.String key)  
      org.apache.activemq.artemis.api.core.SimpleString getSimpleStringProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      java.lang.String getStringProperty​(java.lang.String key)  
      java.lang.String getStringProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      long getTimestamp()  
      java.lang.Object getUserID()  
      boolean hasScheduledDeliveryTime()  
      protected int internalPersistSize()  
      boolean isDurable()  
      protected org.apache.qpid.proton.amqp.messaging.ApplicationProperties lazyDecodeApplicationProperties()  
      protected org.apache.qpid.proton.amqp.messaging.ApplicationProperties lazyDecodeApplicationProperties​(org.apache.qpid.proton.codec.ReadableBuffer data)  
      protected void lazyScanAfterReloadPersistence()  
      void messageChanged()  
      abstract void persist​(org.apache.activemq.artemis.api.core.ActiveMQBuffer targetRecord)  
      org.apache.activemq.artemis.api.core.Message putBooleanProperty​(java.lang.String key, boolean value)  
      org.apache.activemq.artemis.api.core.Message putBooleanProperty​(org.apache.activemq.artemis.api.core.SimpleString key, boolean value)  
      org.apache.activemq.artemis.api.core.Message putByteProperty​(java.lang.String key, byte value)  
      org.apache.activemq.artemis.api.core.Message putByteProperty​(org.apache.activemq.artemis.api.core.SimpleString key, byte value)  
      org.apache.activemq.artemis.api.core.Message putBytesProperty​(java.lang.String key, byte[] value)  
      org.apache.activemq.artemis.api.core.Message putBytesProperty​(org.apache.activemq.artemis.api.core.SimpleString key, byte[] value)  
      org.apache.activemq.artemis.api.core.Message putCharProperty​(java.lang.String key, char value)  
      org.apache.activemq.artemis.api.core.Message putCharProperty​(org.apache.activemq.artemis.api.core.SimpleString key, char value)  
      org.apache.activemq.artemis.api.core.Message putDoubleProperty​(java.lang.String key, double value)  
      org.apache.activemq.artemis.api.core.Message putDoubleProperty​(org.apache.activemq.artemis.api.core.SimpleString key, double value)  
      org.apache.activemq.artemis.api.core.Message putExtraBytesProperty​(org.apache.activemq.artemis.api.core.SimpleString key, byte[] value)  
      org.apache.activemq.artemis.api.core.Message putFloatProperty​(java.lang.String key, float value)  
      org.apache.activemq.artemis.api.core.Message putFloatProperty​(org.apache.activemq.artemis.api.core.SimpleString key, float value)  
      org.apache.activemq.artemis.api.core.Message putIntProperty​(java.lang.String key, int value)  
      org.apache.activemq.artemis.api.core.Message putIntProperty​(org.apache.activemq.artemis.api.core.SimpleString key, int value)  
      org.apache.activemq.artemis.api.core.Message putLongProperty​(java.lang.String key, long value)  
      org.apache.activemq.artemis.api.core.Message putLongProperty​(org.apache.activemq.artemis.api.core.SimpleString key, long value)  
      org.apache.activemq.artemis.api.core.Message putObjectProperty​(java.lang.String key, java.lang.Object value)  
      org.apache.activemq.artemis.api.core.Message putObjectProperty​(org.apache.activemq.artemis.api.core.SimpleString key, java.lang.Object value)  
      org.apache.activemq.artemis.api.core.Message putShortProperty​(java.lang.String key, short value)  
      org.apache.activemq.artemis.api.core.Message putShortProperty​(org.apache.activemq.artemis.api.core.SimpleString key, short value)  
      org.apache.activemq.artemis.api.core.Message putStringProperty​(java.lang.String key, java.lang.String value)  
      org.apache.activemq.artemis.api.core.Message putStringProperty​(org.apache.activemq.artemis.api.core.SimpleString key, java.lang.String value)  
      org.apache.activemq.artemis.api.core.Message putStringProperty​(org.apache.activemq.artemis.api.core.SimpleString key, org.apache.activemq.artemis.api.core.SimpleString value)  
      void receiveBuffer​(io.netty.buffer.ByteBuf buffer)  
      abstract void reencode()  
      void rejectConsumer​(long consumer)  
      void reloadExpiration​(long expiration)  
      abstract void reloadPersistence​(org.apache.activemq.artemis.api.core.ActiveMQBuffer record, org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools pools)  
      java.lang.Object removeAnnotation​(org.apache.activemq.artemis.api.core.SimpleString key)  
      byte[] removeExtraBytesProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      protected java.lang.Object removeMessageAnnotation​(org.apache.qpid.proton.amqp.Symbol annotation)  
      java.lang.Object removeProperty​(java.lang.String key)  
      java.lang.Object removeProperty​(org.apache.activemq.artemis.api.core.SimpleString key)  
      protected void resetMessageData()  
      protected <T> T scanForMessageSection​(int scanStartPosition, java.lang.Class... targetTypes)  
      protected <T> T scanForMessageSection​(org.apache.qpid.proton.codec.ReadableBuffer buffer, int scanStartPosition, java.lang.Class... targetTypes)  
      protected void scanMessageData()  
      protected void scanMessageData​(org.apache.qpid.proton.codec.ReadableBuffer data)  
      void sendBuffer​(io.netty.buffer.ByteBuf buffer, int deliveryCount)
      Would be called by the Artemis Core components to encode the message into the provided send buffer.
      AMQPMessage setAddress​(java.lang.String address)  
      AMQPMessage setAddress​(org.apache.activemq.artemis.api.core.SimpleString address)  
      AMQPMessage setAnnotation​(org.apache.activemq.artemis.api.core.SimpleString key, java.lang.Object value)  
      org.apache.activemq.artemis.api.core.Message setBrokerProperty​(org.apache.activemq.artemis.api.core.SimpleString key, java.lang.Object value)  
      org.apache.activemq.artemis.api.core.Message setConnectionID​(java.lang.String connectionID)  
      org.apache.activemq.artemis.api.core.Message setCorrelationID​(java.lang.Object correlationID)  
      void setDeliveryAnnotationsForSendBuffer​(org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations)
      Deprecated.
      use MessageReference.setProtocolData(deliveryAnnotations)
      org.apache.activemq.artemis.api.core.Message setDurable​(boolean durable)  
      AMQPMessage setExpiration​(long expiration)  
      AMQPMessage setExtraProperties​(org.apache.activemq.artemis.utils.collections.TypedProperties extraProperties)  
      org.apache.activemq.artemis.api.core.Message setIngressTimestamp()  
      org.apache.activemq.artemis.api.core.Message setLastValueProperty​(org.apache.activemq.artemis.api.core.SimpleString lastValueName)  
      protected void setMessageAnnotation​(java.lang.String annotation, java.lang.Object value)  
      protected void setMessageAnnotation​(org.apache.qpid.proton.amqp.Symbol annotation, java.lang.Object value)  
      protected void setMessageAnnotations​(org.apache.qpid.proton.amqp.messaging.MessageAnnotations messageAnnotations)  
      org.apache.activemq.artemis.api.core.Message setMessageID​(long id)  
      void setOwner​(java.lang.Object object)  
      org.apache.activemq.artemis.api.core.Message setPriority​(byte priority)  
      AMQPMessage setReplyTo​(org.apache.activemq.artemis.api.core.SimpleString address)  
      org.apache.activemq.artemis.api.core.Message setRoutingType​(org.apache.activemq.artemis.api.core.RoutingType routingType)  
      AMQPMessage setScheduledDeliveryTime​(java.lang.Long time)  
      org.apache.activemq.artemis.api.core.Message setTimestamp​(long timestamp)  
      org.apache.activemq.artemis.api.core.Message setUserID​(java.lang.Object userID)  
      javax.management.openmbean.CompositeData toCompositeData​(int fieldsLimit, int deliveryCount)  
      org.apache.activemq.artemis.api.core.ICoreMessage toCore()  
      org.apache.activemq.artemis.api.core.ICoreMessage toCore​(org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools coreMessageObjectPools)  
      java.lang.String toDebugString()
      This is different from toString, as this will print an expanded version of the buffer in Hex and programmers's readable format
      java.util.Map<java.lang.String,​java.lang.Object> toPropertyMap​(int valueSizeLimit)  
      java.lang.String toString()  
      protected int unmarshalledApplicationPropertiesMemoryEstimateFromData​(org.apache.qpid.proton.codec.ReadableBuffer data)  
      protected void writeDeliveryAnnotationsForSendBuffer​(io.netty.buffer.ByteBuf result, org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations)  
      • Methods inherited from class org.apache.activemq.artemis.api.core.RefCountMessage

        debugRefs, debugString, durableDown, durableUp, getDurableCount, getParentRef, getRefCount, getUsage, getUserContext, refDown, refUp, releaseComplete, setParentRef, setUserContext, usageDown, usageUp
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.activemq.artemis.api.core.Message

        copy, copy, durableDown, durableUp, getAnnotationString, getBodyBuffer, getBodyInputStream, getDuplicateIDBytes, getDurableCount, getRefCount, getStringBody, getType, getUsage, getUserContext, getValidatedUserID, getWholeMessageSize, isExpired, isLargeMessage, refDown, referenceOriginalMessage, refUp, setGroupID, setGroupID, setGroupSequence, setType, setUserContext, setValidatedUserID, toMap, toMap, toPropertyMap, usageDown, usageUp
    • Field Detail

      • logger

        protected static final org.jboss.logging.Logger logger
      • ADDRESS_PROPERTY

        public static final org.apache.activemq.artemis.api.core.SimpleString ADDRESS_PROPERTY
      • DEFAULT_MESSAGE_PRIORITY

        public static final int DEFAULT_MESSAGE_PRIORITY
        See Also:
        Constant Field Values
      • messageDataScanned

        protected byte messageDataScanned
      • modified

        protected boolean modified
      • headerPosition

        protected int headerPosition
      • encodedHeaderSize

        protected int encodedHeaderSize
      • deliveryAnnotationsPosition

        protected int deliveryAnnotationsPosition
      • encodedDeliveryAnnotationsSize

        protected int encodedDeliveryAnnotationsSize
      • messageAnnotationsPosition

        protected int messageAnnotationsPosition
      • propertiesPosition

        protected int propertiesPosition
      • applicationPropertiesPosition

        protected int applicationPropertiesPosition
      • remainingBodyPosition

        protected int remainingBodyPosition
      • messageFormat

        protected final long messageFormat
      • messageID

        protected long messageID
      • address

        protected org.apache.activemq.artemis.api.core.SimpleString address
      • memoryEstimate

        protected volatile int memoryEstimate
      • expiration

        protected long expiration
      • expirationReload

        protected boolean expirationReload
      • scheduledTime

        protected long scheduledTime
      • header

        protected org.apache.qpid.proton.amqp.messaging.Header header
      • messageAnnotations

        protected org.apache.qpid.proton.amqp.messaging.MessageAnnotations messageAnnotations
      • properties

        protected org.apache.qpid.proton.amqp.messaging.Properties properties
      • applicationProperties

        protected org.apache.qpid.proton.amqp.messaging.ApplicationProperties applicationProperties
      • connectionID

        protected java.lang.String connectionID
      • coreMessageObjectPools

        protected final org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools coreMessageObjectPools
      • rejectedConsumers

        protected java.util.Set<java.lang.Object> rejectedConsumers
      • deliveryAnnotationsForSendBuffer

        protected org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotationsForSendBuffer
      • deliveryAnnotations

        protected org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations
      • extraProperties

        protected volatile org.apache.activemq.artemis.utils.collections.TypedProperties extraProperties
    • Constructor Detail

      • AMQPMessage

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

        protected AMQPMessage​(AMQPMessage copy)
      • AMQPMessage

        protected AMQPMessage​(long messageFormat)
    • Method Detail

      • getProtocolName

        public java.lang.String getProtocolName()
        Specified by:
        getProtocolName in interface org.apache.activemq.artemis.api.core.Message
      • getDecodedApplicationProperties

        protected org.apache.qpid.proton.amqp.messaging.ApplicationProperties getDecodedApplicationProperties()
        This will return application properties without attempting to decode it. That means, if applicationProperties were never parsed before, this will return null, even if there is application properties. This was created as an internal method for testing, as we need to validate if the application properties are not decoded until needed.
      • getDecodedMessageAnnotations

        protected org.apache.qpid.proton.amqp.messaging.MessageAnnotations getDecodedMessageAnnotations()
      • getData

        protected abstract org.apache.qpid.proton.codec.ReadableBuffer getData()
      • getProtonMessage

        public final org.apache.qpid.proton.message.impl.MessageImpl getProtonMessage()
        Creates and returns a Proton-J MessageImpl wrapper around the message data. Changes to the returned Message are not reflected in this message.
        Returns:
        a MessageImpl that wraps the AMQP message data in this AMQPMessage
      • getObjectPropertyForFilter

        public java.lang.Object getObjectPropertyForFilter​(org.apache.activemq.artemis.api.core.SimpleString key)
        Specified by:
        getObjectPropertyForFilter in interface org.apache.activemq.artemis.api.core.Message
      • getHeader

        public final org.apache.qpid.proton.amqp.messaging.Header getHeader()
        Returns a copy of the message Header if one is present, changes to the returned Header instance do not affect the original Message.
        Returns:
        a copy of the Message Header if one exists or null if none present.
      • ensureScanning

        protected void ensureScanning()
      • getDeliveryAnnotations

        public final org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations getDeliveryAnnotations()
        Returns a copy of the MessageAnnotations in the message if present or null. Changes to the returned DeliveryAnnotations instance do not affect the original Message.
        Returns:
        a copy of the DeliveryAnnotations present in the message or null if non present.
      • setDeliveryAnnotationsForSendBuffer

        @Deprecated
        public final void setDeliveryAnnotationsForSendBuffer​(org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations)
        Deprecated.
        use MessageReference.setProtocolData(deliveryAnnotations)
        Sets the delivery annotations to be included when encoding the message for sending it on the wire. The broker can add additional message annotations as long as the annotations being added follow the rules from the spec. If the user adds something that the remote doesn't understand and it is not prefixed with "x-opt" the remote can just kill the link. See: http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-annotations
        Parameters:
        deliveryAnnotations - delivery annotations used in the sendBuffer() method
      • getMessageAnnotations

        public final org.apache.qpid.proton.amqp.messaging.MessageAnnotations getMessageAnnotations()
        Returns a copy of the DeliveryAnnotations in the message if present or null. Changes to the returned MessageAnnotations instance do not affect the original Message.
        Returns:
        a copy of the MessageAnnotations present in the message or null if non present.
      • getProperties

        public final org.apache.qpid.proton.amqp.messaging.Properties getProperties()
        Returns a copy of the message Properties if one is present, changes to the returned Properties instance do not affect the original Message.
        Returns:
        a copy of the Message Properties if one exists or null if none present.
      • getApplicationProperties

        public final org.apache.qpid.proton.amqp.messaging.ApplicationProperties getApplicationProperties()
        Returns a copy of the ApplicationProperties present in the message if present or null. Changes to the returned MessageAnnotations instance do not affect the original Message.
        Returns:
        a copy of the ApplicationProperties present in the message or null if non present.
      • toDebugString

        public final java.lang.String toDebugString()
        This is different from toString, as this will print an expanded version of the buffer in Hex and programmers's readable format
      • getBody

        public final org.apache.qpid.proton.amqp.messaging.Section getBody()
        Retrieves the AMQP Section that composes the body of this message by decoding a fresh copy from the encoded message data. Changes to the returned value are not reflected in the value encoded in the original message.
        Returns:
        the Section that makes up the body of this message.
      • getFooter

        public final org.apache.qpid.proton.amqp.messaging.Footer getFooter()
        Retrieves the AMQP Footer encoded in the data of this message by decoding a fresh copy from the encoded message data. Changes to the returned value are not reflected in the value encoded in the original message.
        Returns:
        the Footer that was encoded into this AMQP Message.
      • scanForMessageSection

        protected <T> T scanForMessageSection​(int scanStartPosition,
                                              java.lang.Class... targetTypes)
      • scanForMessageSection

        protected <T> T scanForMessageSection​(org.apache.qpid.proton.codec.ReadableBuffer buffer,
                                              int scanStartPosition,
                                              java.lang.Class... targetTypes)
      • lazyDecodeApplicationProperties

        protected org.apache.qpid.proton.amqp.messaging.ApplicationProperties lazyDecodeApplicationProperties()
      • lazyDecodeApplicationProperties

        protected org.apache.qpid.proton.amqp.messaging.ApplicationProperties lazyDecodeApplicationProperties​(org.apache.qpid.proton.codec.ReadableBuffer data)
      • unmarshalledApplicationPropertiesMemoryEstimateFromData

        protected int unmarshalledApplicationPropertiesMemoryEstimateFromData​(org.apache.qpid.proton.codec.ReadableBuffer data)
      • getApplicationPropertiesMap

        protected java.util.Map<java.lang.String,​java.lang.Object> getApplicationPropertiesMap​(boolean createIfAbsent)
      • getMessageAnnotationsMap

        protected java.util.Map<org.apache.qpid.proton.amqp.Symbol,​java.lang.Object> getMessageAnnotationsMap​(boolean createIfAbsent)
      • getMessageAnnotation

        protected java.lang.Object getMessageAnnotation​(java.lang.String annotation)
      • getMessageAnnotation

        protected java.lang.Object getMessageAnnotation​(org.apache.qpid.proton.amqp.Symbol annotation)
      • removeMessageAnnotation

        protected java.lang.Object removeMessageAnnotation​(org.apache.qpid.proton.amqp.Symbol annotation)
      • setMessageAnnotation

        protected void setMessageAnnotation​(java.lang.String annotation,
                                            java.lang.Object value)
      • setMessageAnnotation

        protected void setMessageAnnotation​(org.apache.qpid.proton.amqp.Symbol annotation,
                                            java.lang.Object value)
      • setMessageAnnotations

        protected void setMessageAnnotations​(org.apache.qpid.proton.amqp.messaging.MessageAnnotations messageAnnotations)
      • ensureMessageDataScanned

        protected void ensureMessageDataScanned()
      • getEstimateSavedEncode

        protected int getEstimateSavedEncode()
      • resetMessageData

        protected void resetMessageData()
      • scanMessageData

        protected void scanMessageData()
      • scanMessageData

        protected void scanMessageData​(org.apache.qpid.proton.codec.ReadableBuffer data)
      • copy

        public abstract org.apache.activemq.artemis.api.core.Message copy()
        Specified by:
        copy in interface org.apache.activemq.artemis.api.core.Message
      • sendBuffer

        public final void sendBuffer​(io.netty.buffer.ByteBuf buffer,
                                     int deliveryCount)
        Would be called by the Artemis Core components to encode the message into the provided send buffer. Because of how Proton message data handling works this method is not currently used by the AMQP protocol head and will not be called for out-bound sends.
        Specified by:
        sendBuffer in interface org.apache.activemq.artemis.api.core.Message
        See Also:
        for the actual method used for message sends.
      • getSendBuffer

        public org.apache.qpid.proton.codec.ReadableBuffer getSendBuffer​(int deliveryCount,
                                                                         org.apache.activemq.artemis.core.server.MessageReference reference)
        Gets a ByteBuf from the Message that contains the encoded bytes to be sent on the wire.

        When possible this method will present the bytes to the caller without copying them into a new buffer copy. If copying is needed a new Netty buffer is created and returned. The caller should ensure that the reference count on the returned buffer is always decremented to avoid a leak in the case of a copied buffer being returned.

        Parameters:
        deliveryCount - The new delivery count for this message.
        Returns:
        a Netty ByteBuf containing the encoded bytes of this Message instance.
      • createDeliveryCopy

        protected org.apache.qpid.proton.codec.ReadableBuffer createDeliveryCopy​(int deliveryCount,
                                                                                 org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations)
        it will create a copy with the relevant delivery annotation and its copy
      • writeDeliveryAnnotationsForSendBuffer

        protected void writeDeliveryAnnotationsForSendBuffer​(io.netty.buffer.ByteBuf result,
                                                             org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations)
      • getDeliveryAnnotationsForSendBufferSize

        protected int getDeliveryAnnotationsForSendBufferSize()
      • messageChanged

        public void messageChanged()
        Specified by:
        messageChanged in interface org.apache.activemq.artemis.api.core.Message
      • getEncodeSize

        public abstract int getEncodeSize()
        Specified by:
        getEncodeSize in interface org.apache.activemq.artemis.api.core.Message
      • receiveBuffer

        public final void receiveBuffer​(io.netty.buffer.ByteBuf buffer)
        Specified by:
        receiveBuffer in interface org.apache.activemq.artemis.api.core.Message
      • getMemoryEstimate

        public abstract int getMemoryEstimate()
        Specified by:
        getMemoryEstimate in interface org.apache.activemq.artemis.api.core.Message
      • toPropertyMap

        public java.util.Map<java.lang.String,​java.lang.Object> toPropertyMap​(int valueSizeLimit)
        Specified by:
        toPropertyMap in interface org.apache.activemq.artemis.api.core.Message
      • addAnnotationsAsProperties

        protected static void addAnnotationsAsProperties​(java.lang.String prefix,
                                                         java.util.Map map,
                                                         org.apache.qpid.proton.amqp.messaging.MessageAnnotations annotations)
      • toCore

        public org.apache.activemq.artemis.api.core.ICoreMessage toCore​(org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools coreMessageObjectPools)
        Specified by:
        toCore in interface org.apache.activemq.artemis.api.core.Message
      • toCore

        public org.apache.activemq.artemis.api.core.ICoreMessage toCore()
        Specified by:
        toCore in interface org.apache.activemq.artemis.api.core.Message
      • persist

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

        public abstract int getPersistSize()
        Specified by:
        getPersistSize in interface org.apache.activemq.artemis.api.core.Message
      • internalPersistSize

        protected int internalPersistSize()
      • reloadPersistence

        public abstract 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
      • lazyScanAfterReloadPersistence

        protected void lazyScanAfterReloadPersistence()
      • getPersistentSize

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

        public abstract 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
      • reencode

        public abstract void reencode()
        Specified by:
        reencode in interface org.apache.activemq.artemis.api.core.Message
      • ensureDataIsValid

        protected abstract void ensureDataIsValid()
      • encodeMessage

        protected abstract void encodeMessage()
      • createExtraProperties

        public final org.apache.activemq.artemis.utils.collections.TypedProperties createExtraProperties()
      • getExtraProperties

        public final org.apache.activemq.artemis.utils.collections.TypedProperties getExtraProperties()
      • setExtraProperties

        public final AMQPMessage setExtraProperties​(org.apache.activemq.artemis.utils.collections.TypedProperties extraProperties)
      • putExtraBytesProperty

        public final org.apache.activemq.artemis.api.core.Message putExtraBytesProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                        byte[] value)
        Specified by:
        putExtraBytesProperty in interface org.apache.activemq.artemis.api.core.Message
      • getExtraBytesProperty

        public final byte[] getExtraBytesProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                           throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getExtraBytesProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • clearInternalProperties

        public void clearInternalProperties()
        Specified by:
        clearInternalProperties in interface org.apache.activemq.artemis.api.core.Message
      • removeExtraBytesProperty

        public final byte[] removeExtraBytesProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                              throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        removeExtraBytesProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • setConnectionID

        public final org.apache.activemq.artemis.api.core.Message setConnectionID​(java.lang.String connectionID)
        Specified by:
        setConnectionID in interface org.apache.activemq.artemis.api.core.Message
      • getConnectionID

        public final java.lang.String getConnectionID()
        Specified by:
        getConnectionID in interface org.apache.activemq.artemis.api.core.Message
      • getMessageFormat

        public final long getMessageFormat()
      • getMessageID

        public final long getMessageID()
        Specified by:
        getMessageID in interface org.apache.activemq.artemis.api.core.Message
      • setMessageID

        public final org.apache.activemq.artemis.api.core.Message setMessageID​(long id)
        Specified by:
        setMessageID in interface org.apache.activemq.artemis.api.core.Message
      • getExpiration

        public final long getExpiration()
        Specified by:
        getExpiration in interface org.apache.activemq.artemis.api.core.Message
      • reloadExpiration

        public void reloadExpiration​(long expiration)
      • setExpiration

        public final AMQPMessage setExpiration​(long expiration)
        Specified by:
        setExpiration in interface org.apache.activemq.artemis.api.core.Message
      • getUserID

        public final java.lang.Object getUserID()
        Specified by:
        getUserID in interface org.apache.activemq.artemis.api.core.Message
      • getAMQPUserID

        public final java.lang.Object getAMQPUserID()
        Before we added AMQP into Artemis the name getUserID was already taken by JMSMessageID. We cannot simply change the names now as it would break the API for existing clients. This is to return and read the proper AMQP userID.
        Returns:
        the UserID value in the AMQP Properties if one is present.
      • setUserID

        public final org.apache.activemq.artemis.api.core.Message setUserID​(java.lang.Object userID)
        Specified by:
        setUserID in interface org.apache.activemq.artemis.api.core.Message
      • getDuplicateProperty

        public final java.lang.Object getDuplicateProperty()
        Specified by:
        getDuplicateProperty in interface org.apache.activemq.artemis.api.core.Message
      • isDurable

        public boolean isDurable()
        Specified by:
        isDurable in interface org.apache.activemq.artemis.api.core.Message
      • setDurable

        public final org.apache.activemq.artemis.api.core.Message setDurable​(boolean durable)
        Specified by:
        setDurable in interface org.apache.activemq.artemis.api.core.Message
      • getAddress

        public final java.lang.String getAddress()
        Specified by:
        getAddress in interface org.apache.activemq.artemis.api.core.Message
      • setAddress

        public final AMQPMessage setAddress​(java.lang.String address)
        Specified by:
        setAddress in interface org.apache.activemq.artemis.api.core.Message
      • setAddress

        public final AMQPMessage setAddress​(org.apache.activemq.artemis.api.core.SimpleString address)
        Specified by:
        setAddress in interface org.apache.activemq.artemis.api.core.Message
      • getAddressSimpleString

        public final org.apache.activemq.artemis.api.core.SimpleString getAddressSimpleString()
        Specified by:
        getAddressSimpleString in interface org.apache.activemq.artemis.api.core.Message
      • cachedAddressSimpleString

        protected org.apache.activemq.artemis.api.core.SimpleString cachedAddressSimpleString​(java.lang.String address)
      • getTimestamp

        public final long getTimestamp()
        Specified by:
        getTimestamp in interface org.apache.activemq.artemis.api.core.Message
      • setTimestamp

        public final org.apache.activemq.artemis.api.core.Message setTimestamp​(long timestamp)
        Specified by:
        setTimestamp in interface org.apache.activemq.artemis.api.core.Message
      • getPriority

        public final byte getPriority()
        Specified by:
        getPriority in interface org.apache.activemq.artemis.api.core.Message
      • setPriority

        public final org.apache.activemq.artemis.api.core.Message setPriority​(byte priority)
        Specified by:
        setPriority in interface org.apache.activemq.artemis.api.core.Message
      • getReplyTo

        public final org.apache.activemq.artemis.api.core.SimpleString getReplyTo()
        Specified by:
        getReplyTo in interface org.apache.activemq.artemis.api.core.Message
      • setReplyTo

        public final AMQPMessage setReplyTo​(org.apache.activemq.artemis.api.core.SimpleString address)
        Specified by:
        setReplyTo in interface org.apache.activemq.artemis.api.core.Message
      • getRoutingType

        public final org.apache.activemq.artemis.api.core.RoutingType getRoutingType()
        Specified by:
        getRoutingType in interface org.apache.activemq.artemis.api.core.Message
      • setRoutingType

        public final org.apache.activemq.artemis.api.core.Message setRoutingType​(org.apache.activemq.artemis.api.core.RoutingType routingType)
        Specified by:
        setRoutingType in interface org.apache.activemq.artemis.api.core.Message
      • getGroupID

        public final org.apache.activemq.artemis.api.core.SimpleString getGroupID()
        Specified by:
        getGroupID in interface org.apache.activemq.artemis.api.core.Message
      • getGroupSequence

        public final int getGroupSequence()
        Specified by:
        getGroupSequence in interface org.apache.activemq.artemis.api.core.Message
      • getCorrelationID

        public final java.lang.Object getCorrelationID()
        Specified by:
        getCorrelationID in interface org.apache.activemq.artemis.api.core.Message
      • setCorrelationID

        public final org.apache.activemq.artemis.api.core.Message setCorrelationID​(java.lang.Object correlationID)
        Specified by:
        setCorrelationID in interface org.apache.activemq.artemis.api.core.Message
      • hasScheduledDeliveryTime

        public boolean hasScheduledDeliveryTime()
        Specified by:
        hasScheduledDeliveryTime in interface org.apache.activemq.artemis.api.core.Message
      • getScheduledDeliveryTime

        public final java.lang.Long getScheduledDeliveryTime()
        Specified by:
        getScheduledDeliveryTime in interface org.apache.activemq.artemis.api.core.Message
      • setScheduledDeliveryTime

        public final AMQPMessage setScheduledDeliveryTime​(java.lang.Long time)
        Specified by:
        setScheduledDeliveryTime in interface org.apache.activemq.artemis.api.core.Message
      • removeAnnotation

        public final java.lang.Object removeAnnotation​(org.apache.activemq.artemis.api.core.SimpleString key)
        Specified by:
        removeAnnotation in interface org.apache.activemq.artemis.api.core.Message
      • getAnnotation

        public final java.lang.Object getAnnotation​(org.apache.activemq.artemis.api.core.SimpleString key)
        Specified by:
        getAnnotation in interface org.apache.activemq.artemis.api.core.Message
      • setAnnotation

        public final AMQPMessage setAnnotation​(org.apache.activemq.artemis.api.core.SimpleString key,
                                               java.lang.Object value)
        Specified by:
        setAnnotation in interface org.apache.activemq.artemis.api.core.Message
      • setBrokerProperty

        public org.apache.activemq.artemis.api.core.Message setBrokerProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                              java.lang.Object value)
        Specified by:
        setBrokerProperty in interface org.apache.activemq.artemis.api.core.Message
      • getBrokerProperty

        public java.lang.Object getBrokerProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
        Specified by:
        getBrokerProperty in interface org.apache.activemq.artemis.api.core.Message
      • setIngressTimestamp

        public final org.apache.activemq.artemis.api.core.Message setIngressTimestamp()
        Specified by:
        setIngressTimestamp in interface org.apache.activemq.artemis.api.core.Message
      • getIngressTimestamp

        public java.lang.Long getIngressTimestamp()
        Specified by:
        getIngressTimestamp in interface org.apache.activemq.artemis.api.core.Message
      • removeProperty

        public final java.lang.Object removeProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
        Specified by:
        removeProperty in interface org.apache.activemq.artemis.api.core.Message
      • removeProperty

        public final java.lang.Object removeProperty​(java.lang.String key)
        Specified by:
        removeProperty in interface org.apache.activemq.artemis.api.core.Message
      • containsProperty

        public final boolean containsProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
        Specified by:
        containsProperty in interface org.apache.activemq.artemis.api.core.Message
      • containsProperty

        public final boolean containsProperty​(java.lang.String key)
        Specified by:
        containsProperty in interface org.apache.activemq.artemis.api.core.Message
      • getBooleanProperty

        public final java.lang.Boolean getBooleanProperty​(java.lang.String key)
                                                   throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getBooleanProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getByteProperty

        public final java.lang.Byte getByteProperty​(java.lang.String key)
                                             throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getByteProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getDoubleProperty

        public final java.lang.Double getDoubleProperty​(java.lang.String key)
                                                 throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getDoubleProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getIntProperty

        public final java.lang.Integer getIntProperty​(java.lang.String key)
                                               throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getIntProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getLongProperty

        public final java.lang.Long getLongProperty​(java.lang.String key)
                                             throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getLongProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getObjectProperty

        public final java.lang.Object getObjectProperty​(java.lang.String key)
        Specified by:
        getObjectProperty in interface org.apache.activemq.artemis.api.core.Message
      • getShortProperty

        public final java.lang.Short getShortProperty​(java.lang.String key)
                                               throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getShortProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getFloatProperty

        public final java.lang.Float getFloatProperty​(java.lang.String key)
                                               throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getFloatProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getStringProperty

        public final java.lang.String getStringProperty​(java.lang.String key)
                                                 throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getStringProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getPropertyNames

        public final java.util.Set<org.apache.activemq.artemis.api.core.SimpleString> getPropertyNames()
        Specified by:
        getPropertyNames in interface org.apache.activemq.artemis.api.core.Message
      • getBooleanProperty

        public final java.lang.Boolean getBooleanProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                                   throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getBooleanProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getByteProperty

        public final java.lang.Byte getByteProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                             throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getByteProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getBytesProperty

        public final byte[] getBytesProperty​(java.lang.String key)
                                      throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getBytesProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getDoubleProperty

        public final java.lang.Double getDoubleProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                                 throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getDoubleProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getIntProperty

        public final java.lang.Integer getIntProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                               throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getIntProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getLongProperty

        public final java.lang.Long getLongProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                             throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getLongProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getObjectProperty

        public final java.lang.Object getObjectProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
        Specified by:
        getObjectProperty in interface org.apache.activemq.artemis.api.core.Message
      • getShortProperty

        public final java.lang.Short getShortProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                               throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getShortProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getFloatProperty

        public final java.lang.Float getFloatProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                               throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getFloatProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getStringProperty

        public final java.lang.String getStringProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                                 throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getStringProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getSimpleStringProperty

        public final org.apache.activemq.artemis.api.core.SimpleString getSimpleStringProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                                                                        throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getSimpleStringProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getBytesProperty

        public final byte[] getBytesProperty​(org.apache.activemq.artemis.api.core.SimpleString key)
                                      throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getBytesProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • getSimpleStringProperty

        public final org.apache.activemq.artemis.api.core.SimpleString getSimpleStringProperty​(java.lang.String key)
                                                                                        throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        getSimpleStringProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • putBooleanProperty

        public final org.apache.activemq.artemis.api.core.Message putBooleanProperty​(java.lang.String key,
                                                                                     boolean value)
        Specified by:
        putBooleanProperty in interface org.apache.activemq.artemis.api.core.Message
      • putByteProperty

        public final org.apache.activemq.artemis.api.core.Message putByteProperty​(java.lang.String key,
                                                                                  byte value)
        Specified by:
        putByteProperty in interface org.apache.activemq.artemis.api.core.Message
      • putBytesProperty

        public final org.apache.activemq.artemis.api.core.Message putBytesProperty​(java.lang.String key,
                                                                                   byte[] value)
        Specified by:
        putBytesProperty in interface org.apache.activemq.artemis.api.core.Message
      • putShortProperty

        public final org.apache.activemq.artemis.api.core.Message putShortProperty​(java.lang.String key,
                                                                                   short value)
        Specified by:
        putShortProperty in interface org.apache.activemq.artemis.api.core.Message
      • putCharProperty

        public final org.apache.activemq.artemis.api.core.Message putCharProperty​(java.lang.String key,
                                                                                  char value)
        Specified by:
        putCharProperty in interface org.apache.activemq.artemis.api.core.Message
      • putIntProperty

        public final org.apache.activemq.artemis.api.core.Message putIntProperty​(java.lang.String key,
                                                                                 int value)
        Specified by:
        putIntProperty in interface org.apache.activemq.artemis.api.core.Message
      • putLongProperty

        public final org.apache.activemq.artemis.api.core.Message putLongProperty​(java.lang.String key,
                                                                                  long value)
        Specified by:
        putLongProperty in interface org.apache.activemq.artemis.api.core.Message
      • putFloatProperty

        public final org.apache.activemq.artemis.api.core.Message putFloatProperty​(java.lang.String key,
                                                                                   float value)
        Specified by:
        putFloatProperty in interface org.apache.activemq.artemis.api.core.Message
      • putDoubleProperty

        public final org.apache.activemq.artemis.api.core.Message putDoubleProperty​(java.lang.String key,
                                                                                    double value)
        Specified by:
        putDoubleProperty in interface org.apache.activemq.artemis.api.core.Message
      • putBooleanProperty

        public final org.apache.activemq.artemis.api.core.Message putBooleanProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                     boolean value)
        Specified by:
        putBooleanProperty in interface org.apache.activemq.artemis.api.core.Message
      • putByteProperty

        public final org.apache.activemq.artemis.api.core.Message putByteProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                  byte value)
        Specified by:
        putByteProperty in interface org.apache.activemq.artemis.api.core.Message
      • putBytesProperty

        public final org.apache.activemq.artemis.api.core.Message putBytesProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                   byte[] value)
        Specified by:
        putBytesProperty in interface org.apache.activemq.artemis.api.core.Message
      • putShortProperty

        public final org.apache.activemq.artemis.api.core.Message putShortProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                   short value)
        Specified by:
        putShortProperty in interface org.apache.activemq.artemis.api.core.Message
      • putCharProperty

        public final org.apache.activemq.artemis.api.core.Message putCharProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                  char value)
        Specified by:
        putCharProperty in interface org.apache.activemq.artemis.api.core.Message
      • putIntProperty

        public final org.apache.activemq.artemis.api.core.Message putIntProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                 int value)
        Specified by:
        putIntProperty in interface org.apache.activemq.artemis.api.core.Message
      • putLongProperty

        public final org.apache.activemq.artemis.api.core.Message putLongProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                  long value)
        Specified by:
        putLongProperty in interface org.apache.activemq.artemis.api.core.Message
      • putFloatProperty

        public final org.apache.activemq.artemis.api.core.Message putFloatProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                   float value)
        Specified by:
        putFloatProperty in interface org.apache.activemq.artemis.api.core.Message
      • putDoubleProperty

        public final org.apache.activemq.artemis.api.core.Message putDoubleProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                    double value)
        Specified by:
        putDoubleProperty in interface org.apache.activemq.artemis.api.core.Message
      • putStringProperty

        public final org.apache.activemq.artemis.api.core.Message putStringProperty​(java.lang.String key,
                                                                                    java.lang.String value)
        Specified by:
        putStringProperty in interface org.apache.activemq.artemis.api.core.Message
      • putObjectProperty

        public final org.apache.activemq.artemis.api.core.Message putObjectProperty​(java.lang.String key,
                                                                                    java.lang.Object value)
                                                                             throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        putObjectProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • putObjectProperty

        public final org.apache.activemq.artemis.api.core.Message putObjectProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                    java.lang.Object value)
                                                                             throws org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
        Specified by:
        putObjectProperty in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException
      • putStringProperty

        public final org.apache.activemq.artemis.api.core.Message putStringProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                    org.apache.activemq.artemis.api.core.SimpleString value)
        Specified by:
        putStringProperty in interface org.apache.activemq.artemis.api.core.Message
      • putStringProperty

        public final org.apache.activemq.artemis.api.core.Message putStringProperty​(org.apache.activemq.artemis.api.core.SimpleString key,
                                                                                    java.lang.String value)
        Specified by:
        putStringProperty in interface org.apache.activemq.artemis.api.core.Message
      • getLastValueProperty

        public final org.apache.activemq.artemis.api.core.SimpleString getLastValueProperty()
        Specified by:
        getLastValueProperty in interface org.apache.activemq.artemis.api.core.Message
      • setLastValueProperty

        public final org.apache.activemq.artemis.api.core.Message setLastValueProperty​(org.apache.activemq.artemis.api.core.SimpleString lastValueName)
        Specified by:
        setLastValueProperty in interface org.apache.activemq.artemis.api.core.Message
      • toString

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

        public final boolean acceptsConsumer​(long consumer)
        Specified by:
        acceptsConsumer in interface org.apache.activemq.artemis.api.core.Message
      • rejectConsumer

        public final void rejectConsumer​(long consumer)
        Specified by:
        rejectConsumer in interface org.apache.activemq.artemis.api.core.Message
      • getPropertyKeysPool

        protected org.apache.activemq.artemis.api.core.SimpleString.StringSimpleStringPool getPropertyKeysPool()
      • getPropertyValuesPool

        protected org.apache.activemq.artemis.api.core.SimpleString.StringSimpleStringPool getPropertyValuesPool()
      • getOwner

        public java.lang.Object getOwner()
        Specified by:
        getOwner in interface org.apache.activemq.artemis.api.core.Message
      • setOwner

        public void setOwner​(java.lang.Object object)
        Specified by:
        setOwner in interface org.apache.activemq.artemis.api.core.Message
      • toCompositeData

        public javax.management.openmbean.CompositeData toCompositeData​(int fieldsLimit,
                                                                        int deliveryCount)
                                                                 throws javax.management.openmbean.OpenDataException
        Specified by:
        toCompositeData in interface org.apache.activemq.artemis.api.core.Message
        Throws:
        javax.management.openmbean.OpenDataException