public class AMQPMessage extends RefCountMessage
| Modifier and Type | Field and Description |
|---|---|
static SimpleString |
ADDRESS_PROPERTY |
static int |
DEFAULT_MESSAGE_PRIORITY |
static int |
MAX_MESSAGE_PRIORITY |
BYTES_TYPE, DEFAULT_TYPE, EMBEDDED_TYPE, HDR_ACTUAL_EXPIRY_TIME, HDR_BRIDGE_DUPLICATE_ID, HDR_CONTENT_TYPE, HDR_DUPLICATE_DETECTION_ID, HDR_GROUP_ID, HDR_LARGE_BODY_SIZE, HDR_LARGE_COMPRESSED, HDR_LAST_VALUE_NAME, HDR_ORIG_MESSAGE_ID, HDR_ORIGINAL_ADDRESS, HDR_ORIGINAL_QUEUE, HDR_PREFIX, HDR_ROUTE_TO_ACK_IDS, HDR_ROUTE_TO_IDS, HDR_ROUTING_TYPE, HDR_SCALEDOWN_TO_IDS, HDR_SCHEDULED_DELIVERY_TIME, HDR_VALIDATED_USER, MAP_TYPE, memoryOffset, OBJECT_TYPE, STREAM_TYPE, TEXT_TYPE| Constructor and Description |
|---|
AMQPMessage(long messageFormat)
for persistence reload
|
AMQPMessage(long messageFormat,
byte[] data,
TypedProperties extraProperties) |
AMQPMessage(long messageFormat,
byte[] data,
TypedProperties extraProperties,
org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools coreMessageObjectPools) |
AMQPMessage(long messageFormat,
org.apache.qpid.proton.message.Message message) |
AMQPMessage(long messageFormat,
org.apache.qpid.proton.codec.ReadableBuffer data,
TypedProperties extraProperties,
org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools coreMessageObjectPools) |
AMQPMessage(org.apache.qpid.proton.message.Message message) |
decrementDurableRefCount, decrementRefCount, getContext, getRefCount, incrementDurableRefCount, incrementRefCount, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcleanupInternalProperties, getAnnotationString, getBodyBuffer, getBodyInputStream, getDuplicateIDBytes, getType, getValidatedUserID, isExpired, isLargeMessage, referenceOriginalMessage, releaseBuffer, setType, setValidatedUserID, toMap, toPropertyMappublic static final SimpleString ADDRESS_PROPERTY
public static final int DEFAULT_MESSAGE_PRIORITY
public static final int MAX_MESSAGE_PRIORITY
public AMQPMessage(long messageFormat,
byte[] data,
TypedProperties extraProperties)
public AMQPMessage(long messageFormat,
byte[] data,
TypedProperties extraProperties,
org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools coreMessageObjectPools)
public AMQPMessage(long messageFormat,
org.apache.qpid.proton.codec.ReadableBuffer data,
TypedProperties extraProperties,
org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools coreMessageObjectPools)
public AMQPMessage(long messageFormat)
public AMQPMessage(long messageFormat,
org.apache.qpid.proton.message.Message message)
public AMQPMessage(org.apache.qpid.proton.message.Message message)
public org.apache.qpid.proton.message.impl.MessageImpl getProtonMessage()
public String getConnectionID()
public org.apache.qpid.proton.amqp.messaging.MessageAnnotations getMessageAnnotations()
public org.apache.qpid.proton.amqp.messaging.Header getHeader()
public org.apache.qpid.proton.amqp.messaging.Properties getProperties()
public RoutingType getRoutingType()
public Message setRoutingType(RoutingType routingType)
public SimpleString getGroupID()
public Long getScheduledDeliveryTime()
public AMQPMessage setScheduledDeliveryTime(Long time)
public boolean acceptsConsumer(long consumer)
public void rejectConsumer(long consumer)
public long getMessageFormat()
public void messageChanged()
public io.netty.buffer.ByteBuf getBuffer()
public AMQPMessage setBuffer(io.netty.buffer.ByteBuf buffer)
public Message copy()
public Message copy(long newID)
public long getMessageID()
public Message setMessageID(long id)
public long getExpiration()
public AMQPMessage setExpiration(long expiration)
public Object getUserID()
public Object getAMQPUserID()
public boolean isDurable()
public Object getDuplicateProperty()
public Message setDurable(boolean durable)
public String getAddress()
public SimpleString cachedAddressSimpleString(String address)
public AMQPMessage setAddress(String address)
public AMQPMessage setAddress(SimpleString address)
public SimpleString getAddressSimpleString()
public long getTimestamp()
public Message setTimestamp(long timestamp)
public byte getPriority()
public Message setPriority(byte priority)
public void receiveBuffer(io.netty.buffer.ByteBuf buffer)
public int getEncodeSize()
public void sendBuffer(io.netty.buffer.ByteBuf buffer,
int deliveryCount)
public org.apache.qpid.proton.codec.ReadableBuffer getSendBuffer(int deliveryCount)
When possible this method will present the bytes to the caller without copying them into another 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.
deliveryCount - The new delivery count for this message.public TypedProperties createExtraProperties()
public TypedProperties getExtraProperties()
public AMQPMessage setExtraProperties(TypedProperties extraProperties)
public Message putExtraBytesProperty(SimpleString key, byte[] value)
public byte[] getExtraBytesProperty(SimpleString key) throws ActiveMQPropertyConversionException
public byte[] removeExtraBytesProperty(SimpleString key) throws ActiveMQPropertyConversionException
public Message putBooleanProperty(SimpleString key, boolean value)
public Message putByteProperty(SimpleString key, byte value)
public Message putBytesProperty(SimpleString key, byte[] value)
public Message putShortProperty(SimpleString key, short value)
public Message putCharProperty(SimpleString key, char value)
public Message putIntProperty(SimpleString key, int value)
public Message putLongProperty(SimpleString key, long value)
public Message putFloatProperty(SimpleString key, float value)
public Message putDoubleProperty(SimpleString key, double value)
public Message putObjectProperty(String key, Object value) throws ActiveMQPropertyConversionException
public Message putObjectProperty(SimpleString key, Object value) throws ActiveMQPropertyConversionException
public boolean containsProperty(String key)
public Boolean getBooleanProperty(String key) throws ActiveMQPropertyConversionException
public Byte getByteProperty(String key) throws ActiveMQPropertyConversionException
public Double getDoubleProperty(String key) throws ActiveMQPropertyConversionException
public Integer getIntProperty(String key) throws ActiveMQPropertyConversionException
public Long getLongProperty(String key) throws ActiveMQPropertyConversionException
public Short getShortProperty(String key) throws ActiveMQPropertyConversionException
public Float getFloatProperty(String key) throws ActiveMQPropertyConversionException
public String getStringProperty(String key) throws ActiveMQPropertyConversionException
public Object removeAnnotation(SimpleString key)
public Object getAnnotation(SimpleString key)
public AMQPMessage setAnnotation(SimpleString key, Object value)
public void reencode()
public SimpleString getSimpleStringProperty(String key) throws ActiveMQPropertyConversionException
public byte[] getBytesProperty(String key) throws ActiveMQPropertyConversionException
public Object removeProperty(SimpleString key)
public boolean containsProperty(SimpleString key)
public Boolean getBooleanProperty(SimpleString key) throws ActiveMQPropertyConversionException
public Byte getByteProperty(SimpleString key) throws ActiveMQPropertyConversionException
public Double getDoubleProperty(SimpleString key) throws ActiveMQPropertyConversionException
public Integer getIntProperty(SimpleString key) throws ActiveMQPropertyConversionException
public Long getLongProperty(SimpleString key) throws ActiveMQPropertyConversionException
public Object getObjectProperty(SimpleString key)
public Short getShortProperty(SimpleString key) throws ActiveMQPropertyConversionException
public Float getFloatProperty(SimpleString key) throws ActiveMQPropertyConversionException
public String getStringProperty(SimpleString key) throws ActiveMQPropertyConversionException
public SimpleString getSimpleStringProperty(SimpleString key) throws ActiveMQPropertyConversionException
public byte[] getBytesProperty(SimpleString key) throws ActiveMQPropertyConversionException
public Message putStringProperty(SimpleString key, SimpleString value)
public Message putStringProperty(SimpleString key, String value)
public Set<SimpleString> getPropertyNames()
public int getMemoryEstimate()
public ICoreMessage toCore(org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools coreMessageObjectPools)
public ICoreMessage toCore()
public SimpleString getLastValueProperty()
public Message setLastValueProperty(SimpleString lastValueName)
public SimpleString getReplyTo()
public AMQPMessage setReplyTo(SimpleString address)
public int getPersistSize()
public void persist(ActiveMQBuffer targetRecord)
public void reloadPersistence(ActiveMQBuffer record)
public long getPersistentSize()
throws ActiveMQException
ActiveMQExceptionCopyright © 2018 The Apache Software Foundation. All Rights Reserved.