Class AmqpJmsTextMessageFacade
- java.lang.Object
-
- org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
-
- org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade
-
- All Implemented Interfaces:
JmsMessageFacade,JmsTextMessageFacade,TraceableMessage
public class AmqpJmsTextMessageFacade extends AmqpJmsMessageFacade implements JmsTextMessageFacade
Wrapper around an AMQP Message instance that will be treated as a JMS TextMessage type.
-
-
Field Summary
-
Fields inherited from class org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
connection
-
-
Constructor Summary
Constructors Constructor Description AmqpJmsTextMessageFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JmsTextMessageasJmsMessage()voidclearBody()Clears the contents of this Message.AmqpJmsTextMessageFacadecopy()Create a new instance and perform a deep copy of this object's contents.bytegetJmsMsgType()StringgetText()Returns the String payload of the Message or null if none set.booleanhasBody()Returns true if the underlying message has a body, false if the body is empty.protected voidinitializeEmptyBody()Used to indicate that a Message object should empty the body element and make any other internal updates to reflect the message now has no body value.voidsetText(String value)Sets the new String payload of the wrapped message, or clears the old value if the given value is null.-
Methods inherited from class org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
applicationPropertyExists, clearProperties, copyInto, encodeMessage, filterTracingAnnotations, getAmqpTimeToLiveOverride, getApplicationProperty, getApplicationPropertyNames, getContentType, getCorrelationId, getCorrelationIdBytes, getDeliveryCount, getDeliveryTime, getDestination, getExpiration, getGroupId, getGroupSequence, getMessageId, getPriority, getProperty, getPropertyNames, getProviderMessageIdObject, getRedeliveryCount, getReplyTo, getReplyToGroupId, getTimestamp, getTracingAnnotation, getTracingContext, getType, getUserId, getUserIdBytes, hasAmqpTimeToLiveOverride, initialize, initialize, isDeliveryTimeTransmitted, isPersistent, isRedelivered, onDispatch, onSend, propertyExists, removeTracingAnnotation, removeTracingContext, setAmqpTimeToLiveOverride, setApplicationProperty, setContentType, setCorrelationId, setCorrelationIdBytes, setDeliveryCount, setDeliveryTime, setDestination, setExpiration, setGroupId, setGroupSequence, setMessageId, setPersistent, setPriority, setProperty, setProviderMessageIdObject, setRedelivered, setRedeliveryCount, setReplyTo, setReplyToGroupId, setTimestamp, setTracingAnnotation, setTracingContext, setType, setUserId, setUserIdBytes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.jms.message.facade.JmsMessageFacade
clearProperties, encodeMessage, getCorrelationId, getCorrelationIdBytes, getDeliveryCount, getDeliveryTime, getDestination, getExpiration, getGroupId, getGroupSequence, getMessageId, getPriority, getProperty, getPropertyNames, getProviderMessageIdObject, getRedeliveryCount, getReplyTo, getTimestamp, getType, getUserId, getUserIdBytes, isDeliveryTimeTransmitted, isPersistent, isRedelivered, onDispatch, onSend, propertyExists, setCorrelationId, setCorrelationIdBytes, setDeliveryCount, setDeliveryTime, setDestination, setExpiration, setGroupId, setGroupSequence, setMessageId, setPersistent, setPriority, setProperty, setProviderMessageIdObject, setRedelivered, setRedeliveryCount, setReplyTo, setTimestamp, setType, setUserId, setUserIdBytes
-
Methods inherited from interface org.apache.qpid.jms.tracing.TraceableMessage
filterTracingAnnotations, getTracingAnnotation, getTracingContext, removeTracingAnnotation, removeTracingContext, setTracingAnnotation, setTracingContext
-
-
-
-
Method Detail
-
getJmsMsgType
public byte getJmsMsgType()
- Overrides:
getJmsMsgTypein classAmqpJmsMessageFacade- Returns:
- the appropriate byte value that indicates the type of message this is.
-
copy
public AmqpJmsTextMessageFacade copy() throws javax.jms.JMSException
Description copied from interface:JmsMessageFacadeCreate a new instance and perform a deep copy of this object's contents.- Specified by:
copyin interfaceJmsMessageFacade- Specified by:
copyin interfaceJmsTextMessageFacade- Overrides:
copyin classAmqpJmsMessageFacade- Returns:
- a copy of this JmsMessageFacade instance.
- Throws:
javax.jms.JMSException- if an error occurs while copying the message.
-
getText
public String getText() throws javax.jms.JMSException
Description copied from interface:JmsTextMessageFacadeReturns the String payload of the Message or null if none set.- Specified by:
getTextin interfaceJmsTextMessageFacade- Returns:
- the String value contained in the message.
- Throws:
javax.jms.JMSException- if an error occurs while decoding text payload.
-
setText
public void setText(String value)
Description copied from interface:JmsTextMessageFacadeSets the new String payload of the wrapped message, or clears the old value if the given value is null.- Specified by:
setTextin interfaceJmsTextMessageFacade- Parameters:
value- the new String payload, or null to clear the contents.
-
clearBody
public void clearBody()
Description copied from interface:JmsMessageFacadeClears the contents of this Message.- Specified by:
clearBodyin interfaceJmsMessageFacade- Overrides:
clearBodyin classAmqpJmsMessageFacade
-
hasBody
public boolean hasBody()
Description copied from interface:JmsMessageFacadeReturns true if the underlying message has a body, false if the body is empty.- Specified by:
hasBodyin interfaceJmsMessageFacade- Overrides:
hasBodyin classAmqpJmsMessageFacade- Returns:
- true if the underlying message has a body, false if the body is empty.
-
asJmsMessage
public JmsTextMessage asJmsMessage()
- Overrides:
asJmsMessagein classAmqpJmsMessageFacade
-
initializeEmptyBody
protected void initializeEmptyBody()
Description copied from class:AmqpJmsMessageFacadeUsed to indicate that a Message object should empty the body element and make any other internal updates to reflect the message now has no body value.- Overrides:
initializeEmptyBodyin classAmqpJmsMessageFacade
-
-