Package org.apache.activemq.artemis.ra
Class ActiveMQRAMessage
- java.lang.Object
-
- org.apache.activemq.artemis.ra.ActiveMQRAMessage
-
- All Implemented Interfaces:
jakarta.jms.Message
- Direct Known Subclasses:
ActiveMQRABytesMessage,ActiveMQRAMapMessage,ActiveMQRAObjectMessage,ActiveMQRAStreamMessage,ActiveMQRATextMessage
public class ActiveMQRAMessage extends java.lang.Object implements jakarta.jms.MessageA wrapper for a message
-
-
Field Summary
Fields Modifier and Type Field Description protected jakarta.jms.MessagemessageThe messageprotected ActiveMQRASessionsessionThe session
-
Constructor Summary
Constructors Constructor Description ActiveMQRAMessage(jakarta.jms.Message message, ActiveMQRASession session)Create a new wrapper
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacknowledge()AcknowledgevoidclearBody()Clear bodyvoidclearProperties()Clear propertiesbooleanequals(java.lang.Object object)Check for equality<T> TgetBody(java.lang.Class<T> c)booleangetBooleanProperty(java.lang.String name)Get propertybytegetByteProperty(java.lang.String name)Get propertydoublegetDoubleProperty(java.lang.String name)Get propertyfloatgetFloatProperty(java.lang.String name)Get propertyintgetIntProperty(java.lang.String name)Get propertyjava.lang.StringgetJMSCorrelationID()Get correlation idbyte[]getJMSCorrelationIDAsBytes()Get correlation idintgetJMSDeliveryMode()Get delivery modelonggetJMSDeliveryTime()jakarta.jms.DestinationgetJMSDestination()Get destinationlonggetJMSExpiration()Get expirationjava.lang.StringgetJMSMessageID()Get message idintgetJMSPriority()Get prioritybooleangetJMSRedelivered()Get redelivered statusjakarta.jms.DestinationgetJMSReplyTo()Get reply to destinationlonggetJMSTimestamp()Get timestampjava.lang.StringgetJMSType()Get typelonggetLongProperty(java.lang.String name)Get propertyjava.lang.ObjectgetObjectProperty(java.lang.String name)Get propertyjava.util.EnumerationgetPropertyNames()Get property namesshortgetShortProperty(java.lang.String name)Get propertyjava.lang.StringgetStringProperty(java.lang.String name)Get propertyinthashCode()Return the hash codebooleanisBodyAssignableTo(java.lang.Class c)booleanpropertyExists(java.lang.String name)Do property existvoidsetBooleanProperty(java.lang.String name, boolean value)Set propertyvoidsetByteProperty(java.lang.String name, byte value)Set propertyvoidsetDoubleProperty(java.lang.String name, double value)Set propertyvoidsetFloatProperty(java.lang.String name, float value)Set propertyvoidsetIntProperty(java.lang.String name, int value)Set propertyvoidsetJMSCorrelationID(java.lang.String correlationID)Set correlation idvoidsetJMSCorrelationIDAsBytes(byte[] correlationID)Set correlation idvoidsetJMSDeliveryMode(int deliveryMode)Set delivery modevoidsetJMSDeliveryTime(long deliveryTime)voidsetJMSDestination(jakarta.jms.Destination destination)Set destinationvoidsetJMSExpiration(long expiration)Set expirationvoidsetJMSMessageID(java.lang.String id)Set message idvoidsetJMSPriority(int priority)Set priorityvoidsetJMSRedelivered(boolean redelivered)Set redelivered statusvoidsetJMSReplyTo(jakarta.jms.Destination replyTo)Set reply tovoidsetJMSTimestamp(long timestamp)Set timestampvoidsetJMSType(java.lang.String type)Set typevoidsetLongProperty(java.lang.String name, long value)Set propertyvoidsetObjectProperty(java.lang.String name, java.lang.Object value)Set propertyvoidsetShortProperty(java.lang.String name, short value)Set propertyvoidsetStringProperty(java.lang.String name, java.lang.String value)Set propertyjava.lang.StringtoString()Return string representation
-
-
-
Field Detail
-
message
protected jakarta.jms.Message message
The message
-
session
protected ActiveMQRASession session
The session
-
-
Constructor Detail
-
ActiveMQRAMessage
public ActiveMQRAMessage(jakarta.jms.Message message, ActiveMQRASession session)Create a new wrapper- Parameters:
message- the messagesession- the session
-
-
Method Detail
-
acknowledge
public void acknowledge() throws jakarta.jms.JMSExceptionAcknowledge- Specified by:
acknowledgein interfacejakarta.jms.Message- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
clearBody
public void clearBody() throws jakarta.jms.JMSExceptionClear body- Specified by:
clearBodyin interfacejakarta.jms.Message- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
clearProperties
public void clearProperties() throws jakarta.jms.JMSExceptionClear properties- Specified by:
clearPropertiesin interfacejakarta.jms.Message- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getBooleanProperty
public boolean getBooleanProperty(java.lang.String name) throws jakarta.jms.JMSExceptionGet property- Specified by:
getBooleanPropertyin interfacejakarta.jms.Message- Parameters:
name- The name- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getByteProperty
public byte getByteProperty(java.lang.String name) throws jakarta.jms.JMSExceptionGet property- Specified by:
getBytePropertyin interfacejakarta.jms.Message- Parameters:
name- The name- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getDoubleProperty
public double getDoubleProperty(java.lang.String name) throws jakarta.jms.JMSExceptionGet property- Specified by:
getDoublePropertyin interfacejakarta.jms.Message- Parameters:
name- The name- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getFloatProperty
public float getFloatProperty(java.lang.String name) throws jakarta.jms.JMSExceptionGet property- Specified by:
getFloatPropertyin interfacejakarta.jms.Message- Parameters:
name- The name- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getIntProperty
public int getIntProperty(java.lang.String name) throws jakarta.jms.JMSExceptionGet property- Specified by:
getIntPropertyin interfacejakarta.jms.Message- Parameters:
name- The name- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSCorrelationID
public java.lang.String getJMSCorrelationID() throws jakarta.jms.JMSExceptionGet correlation id- Specified by:
getJMSCorrelationIDin interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSCorrelationIDAsBytes
public byte[] getJMSCorrelationIDAsBytes() throws jakarta.jms.JMSExceptionGet correlation id- Specified by:
getJMSCorrelationIDAsBytesin interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSDeliveryMode
public int getJMSDeliveryMode() throws jakarta.jms.JMSExceptionGet delivery mode- Specified by:
getJMSDeliveryModein interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSDestination
public jakarta.jms.Destination getJMSDestination() throws jakarta.jms.JMSExceptionGet destination- Specified by:
getJMSDestinationin interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSExpiration
public long getJMSExpiration() throws jakarta.jms.JMSExceptionGet expiration- Specified by:
getJMSExpirationin interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSMessageID
public java.lang.String getJMSMessageID() throws jakarta.jms.JMSExceptionGet message id- Specified by:
getJMSMessageIDin interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSPriority
public int getJMSPriority() throws jakarta.jms.JMSExceptionGet priority- Specified by:
getJMSPriorityin interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSRedelivered
public boolean getJMSRedelivered() throws jakarta.jms.JMSExceptionGet redelivered status- Specified by:
getJMSRedeliveredin interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSReplyTo
public jakarta.jms.Destination getJMSReplyTo() throws jakarta.jms.JMSExceptionGet reply to destination- Specified by:
getJMSReplyToin interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSTimestamp
public long getJMSTimestamp() throws jakarta.jms.JMSExceptionGet timestamp- Specified by:
getJMSTimestampin interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSType
public java.lang.String getJMSType() throws jakarta.jms.JMSExceptionGet type- Specified by:
getJMSTypein interfacejakarta.jms.Message- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getLongProperty
public long getLongProperty(java.lang.String name) throws jakarta.jms.JMSExceptionGet property- Specified by:
getLongPropertyin interfacejakarta.jms.Message- Parameters:
name- The name- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getObjectProperty
public java.lang.Object getObjectProperty(java.lang.String name) throws jakarta.jms.JMSExceptionGet property- Specified by:
getObjectPropertyin interfacejakarta.jms.Message- Parameters:
name- The name- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getPropertyNames
public java.util.Enumeration getPropertyNames() throws jakarta.jms.JMSExceptionGet property names- Specified by:
getPropertyNamesin interfacejakarta.jms.Message- Returns:
- The values
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getShortProperty
public short getShortProperty(java.lang.String name) throws jakarta.jms.JMSExceptionGet property- Specified by:
getShortPropertyin interfacejakarta.jms.Message- Parameters:
name- The name- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getStringProperty
public java.lang.String getStringProperty(java.lang.String name) throws jakarta.jms.JMSExceptionGet property- Specified by:
getStringPropertyin interfacejakarta.jms.Message- Parameters:
name- The name- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
propertyExists
public boolean propertyExists(java.lang.String name) throws jakarta.jms.JMSExceptionDo property exist- Specified by:
propertyExistsin interfacejakarta.jms.Message- Parameters:
name- The name- Returns:
- The value
- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setBooleanProperty
public void setBooleanProperty(java.lang.String name, boolean value) throws jakarta.jms.JMSExceptionSet property- Specified by:
setBooleanPropertyin interfacejakarta.jms.Message- Parameters:
name- The namevalue- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setByteProperty
public void setByteProperty(java.lang.String name, byte value) throws jakarta.jms.JMSExceptionSet property- Specified by:
setBytePropertyin interfacejakarta.jms.Message- Parameters:
name- The namevalue- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setDoubleProperty
public void setDoubleProperty(java.lang.String name, double value) throws jakarta.jms.JMSExceptionSet property- Specified by:
setDoublePropertyin interfacejakarta.jms.Message- Parameters:
name- The namevalue- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setFloatProperty
public void setFloatProperty(java.lang.String name, float value) throws jakarta.jms.JMSExceptionSet property- Specified by:
setFloatPropertyin interfacejakarta.jms.Message- Parameters:
name- The namevalue- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setIntProperty
public void setIntProperty(java.lang.String name, int value) throws jakarta.jms.JMSExceptionSet property- Specified by:
setIntPropertyin interfacejakarta.jms.Message- Parameters:
name- The namevalue- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSCorrelationID
public void setJMSCorrelationID(java.lang.String correlationID) throws jakarta.jms.JMSExceptionSet correlation id- Specified by:
setJMSCorrelationIDin interfacejakarta.jms.Message- Parameters:
correlationID- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSCorrelationIDAsBytes
public void setJMSCorrelationIDAsBytes(byte[] correlationID) throws jakarta.jms.JMSExceptionSet correlation id- Specified by:
setJMSCorrelationIDAsBytesin interfacejakarta.jms.Message- Parameters:
correlationID- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSDeliveryMode
public void setJMSDeliveryMode(int deliveryMode) throws jakarta.jms.JMSExceptionSet delivery mode- Specified by:
setJMSDeliveryModein interfacejakarta.jms.Message- Parameters:
deliveryMode- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSDestination
public void setJMSDestination(jakarta.jms.Destination destination) throws jakarta.jms.JMSExceptionSet destination- Specified by:
setJMSDestinationin interfacejakarta.jms.Message- Parameters:
destination- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSExpiration
public void setJMSExpiration(long expiration) throws jakarta.jms.JMSExceptionSet expiration- Specified by:
setJMSExpirationin interfacejakarta.jms.Message- Parameters:
expiration- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSMessageID
public void setJMSMessageID(java.lang.String id) throws jakarta.jms.JMSExceptionSet message id- Specified by:
setJMSMessageIDin interfacejakarta.jms.Message- Parameters:
id- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSPriority
public void setJMSPriority(int priority) throws jakarta.jms.JMSExceptionSet priority- Specified by:
setJMSPriorityin interfacejakarta.jms.Message- Parameters:
priority- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSRedelivered
public void setJMSRedelivered(boolean redelivered) throws jakarta.jms.JMSExceptionSet redelivered status- Specified by:
setJMSRedeliveredin interfacejakarta.jms.Message- Parameters:
redelivered- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSReplyTo
public void setJMSReplyTo(jakarta.jms.Destination replyTo) throws jakarta.jms.JMSExceptionSet reply to- Specified by:
setJMSReplyToin interfacejakarta.jms.Message- Parameters:
replyTo- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSTimestamp
public void setJMSTimestamp(long timestamp) throws jakarta.jms.JMSExceptionSet timestamp- Specified by:
setJMSTimestampin interfacejakarta.jms.Message- Parameters:
timestamp- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setJMSType
public void setJMSType(java.lang.String type) throws jakarta.jms.JMSExceptionSet type- Specified by:
setJMSTypein interfacejakarta.jms.Message- Parameters:
type- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setLongProperty
public void setLongProperty(java.lang.String name, long value) throws jakarta.jms.JMSExceptionSet property- Specified by:
setLongPropertyin interfacejakarta.jms.Message- Parameters:
name- The namevalue- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setObjectProperty
public void setObjectProperty(java.lang.String name, java.lang.Object value) throws jakarta.jms.JMSExceptionSet property- Specified by:
setObjectPropertyin interfacejakarta.jms.Message- Parameters:
name- The namevalue- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setShortProperty
public void setShortProperty(java.lang.String name, short value) throws jakarta.jms.JMSExceptionSet property- Specified by:
setShortPropertyin interfacejakarta.jms.Message- Parameters:
name- The namevalue- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
setStringProperty
public void setStringProperty(java.lang.String name, java.lang.String value) throws jakarta.jms.JMSExceptionSet property- Specified by:
setStringPropertyin interfacejakarta.jms.Message- Parameters:
name- The namevalue- The value- Throws:
jakarta.jms.JMSException- Thrown if an error occurs
-
getJMSDeliveryTime
public long getJMSDeliveryTime() throws jakarta.jms.JMSException- Specified by:
getJMSDeliveryTimein interfacejakarta.jms.Message- Throws:
jakarta.jms.JMSException
-
setJMSDeliveryTime
public void setJMSDeliveryTime(long deliveryTime) throws jakarta.jms.JMSException- Specified by:
setJMSDeliveryTimein interfacejakarta.jms.Message- Throws:
jakarta.jms.JMSException
-
getBody
public <T> T getBody(java.lang.Class<T> c) throws jakarta.jms.JMSException- Specified by:
getBodyin interfacejakarta.jms.Message- Throws:
jakarta.jms.JMSException
-
isBodyAssignableTo
public boolean isBodyAssignableTo(java.lang.Class c) throws jakarta.jms.JMSException- Specified by:
isBodyAssignableToin interfacejakarta.jms.Message- Throws:
jakarta.jms.JMSException
-
hashCode
public int hashCode()
Return the hash code- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code
-
equals
public boolean equals(java.lang.Object object)
Check for equality- Overrides:
equalsin classjava.lang.Object- Parameters:
object- The other object- Returns:
- True / false
-
toString
public java.lang.String toString()
Return string representation- Overrides:
toStringin classjava.lang.Object- Returns:
- The string
-
-