Class CoreMessageWrapper
- java.lang.Object
-
- org.apache.activemq.artemis.protocol.amqp.converter.coreWrapper.CoreMessageWrapper
-
- Direct Known Subclasses:
CoreBytesMessageWrapper,CoreMapMessageWrapper,CoreObjectMessageWrapper,CoreStreamMessageWrapper,CoreTextMessageWrapper
public class CoreMessageWrapper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ICoreMessagemessage
-
Constructor Summary
Constructors Constructor Description CoreMessageWrapper(ICoreMessage message)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearBody()voidclearProperties()org.apache.qpid.proton.amqp.messaging.SectioncreateAMQPSection(Map<org.apache.qpid.proton.amqp.Symbol,Object> maMap, org.apache.qpid.proton.amqp.messaging.Properties properties)voiddecode()voidencode()Encode the body into the internal messagebooleangetBooleanProperty(String name)bytegetByteProperty(String name)SimpleStringgetDestination()doublegetDoubleProperty(String name)longgetExpiration()floatgetFloatProperty(String name)ICoreMessagegetInnerMessage()intgetIntProperty(String name)StringgetJMSCorrelationID()byte[]getJMSCorrelationIDAsBytes()intgetJMSDeliveryMode()StringgetJMSMessageID()intgetJMSPriority()SimpleStringgetJMSReplyTo()longgetJMSTimestamp()StringgetJMSType()longgetLongProperty(String name)ObjectgetObjectProperty(String name)protected shortgetOrignalEncoding()EnumerationgetPropertyNames()protected ActiveMQBuffergetReadBodyBuffer()When reading we use a protected copy so multi-threads can work fineshortgetShortProperty(String name)StringgetStringProperty(String name)protected ActiveMQBuffergetWriteBodyBuffer()When writing on the conversion we use the buffer directlybooleanpropertyExists(String name)voidsetBooleanProperty(String name, boolean value)voidsetByteProperty(String name, byte value)voidsetDeliveryMode(int deliveryMode)voidsetDestination(String destination)voidsetDoubleProperty(String name, double value)voidsetFloatProperty(String name, float value)voidsetIntProperty(String name, int value)voidsetJMSCorrelationID(String correlationID)voidsetJMSCorrelationIDAsBytes(byte[] correlationID)voidsetJMSExpiration(long expiration)voidsetJMSMessageID(String id)voidsetJMSPriority(int priority)voidsetJMSReplyTo(String replyTo)voidsetJMSTimestamp(long timestamp)voidsetJMSType(String type)voidsetLongProperty(String name, long value)voidsetObjectProperty(String name, Object value)voidsetShortProperty(String name, short value)voidsetStringProperty(String name, String value)static CoreMessageWrapperwrap(ICoreMessage wrapped)
-
-
-
Field Detail
-
message
protected final ICoreMessage message
-
-
Constructor Detail
-
CoreMessageWrapper
public CoreMessageWrapper(ICoreMessage message)
-
-
Method Detail
-
wrap
public static CoreMessageWrapper wrap(ICoreMessage wrapped)
-
getOrignalEncoding
protected short getOrignalEncoding()
-
createAMQPSection
public org.apache.qpid.proton.amqp.messaging.Section createAMQPSection(Map<org.apache.qpid.proton.amqp.Symbol,Object> maMap, org.apache.qpid.proton.amqp.messaging.Properties properties) throws ConversionException
- Throws:
ConversionException
-
getInnerMessage
public ICoreMessage getInnerMessage()
-
getReadBodyBuffer
protected ActiveMQBuffer getReadBodyBuffer()
When reading we use a protected copy so multi-threads can work fine
-
getWriteBodyBuffer
protected ActiveMQBuffer getWriteBodyBuffer()
When writing on the conversion we use the buffer directly
-
getJMSMessageID
public final String getJMSMessageID()
-
setJMSMessageID
public final void setJMSMessageID(String id)
-
getJMSTimestamp
public final long getJMSTimestamp()
-
setJMSTimestamp
public final void setJMSTimestamp(long timestamp)
-
getJMSCorrelationIDAsBytes
public final byte[] getJMSCorrelationIDAsBytes()
-
setJMSCorrelationIDAsBytes
public final void setJMSCorrelationIDAsBytes(byte[] correlationID)
-
getJMSCorrelationID
public final String getJMSCorrelationID()
-
setJMSCorrelationID
public final void setJMSCorrelationID(String correlationID)
-
getJMSReplyTo
public final SimpleString getJMSReplyTo()
-
setJMSReplyTo
public final void setJMSReplyTo(String replyTo)
-
getDestination
public SimpleString getDestination()
-
setDestination
public final void setDestination(String destination)
-
getJMSDeliveryMode
public final int getJMSDeliveryMode()
-
setDeliveryMode
public final void setDeliveryMode(int deliveryMode) throws ConversionException- Throws:
ConversionException
-
getJMSType
public final String getJMSType()
-
setJMSType
public final void setJMSType(String type)
-
getExpiration
public final long getExpiration()
-
setJMSExpiration
public final void setJMSExpiration(long expiration)
-
getJMSPriority
public final int getJMSPriority()
-
setJMSPriority
public final void setJMSPriority(int priority)
-
clearProperties
public final void clearProperties()
-
propertyExists
public final boolean propertyExists(String name)
-
getBooleanProperty
public final boolean getBooleanProperty(String name)
-
getByteProperty
public final byte getByteProperty(String name)
-
getShortProperty
public final short getShortProperty(String name)
-
getIntProperty
public final int getIntProperty(String name)
-
getLongProperty
public final long getLongProperty(String name)
-
getFloatProperty
public final float getFloatProperty(String name)
-
getDoubleProperty
public final double getDoubleProperty(String name)
-
getPropertyNames
public final Enumeration getPropertyNames()
-
setBooleanProperty
public final void setBooleanProperty(String name, boolean value)
-
setByteProperty
public final void setByteProperty(String name, byte value)
-
setShortProperty
public final void setShortProperty(String name, short value)
-
setIntProperty
public final void setIntProperty(String name, int value)
-
setLongProperty
public final void setLongProperty(String name, long value)
-
setFloatProperty
public final void setFloatProperty(String name, float value)
-
setDoubleProperty
public final void setDoubleProperty(String name, double value)
-
clearBody
public void clearBody()
-
encode
public void encode()
Encode the body into the internal message
-
decode
public void decode()
-
-