Package org.apache.activemq.command
Class ActiveMQTextMessage
- java.lang.Object
-
- org.apache.activemq.command.BaseCommand
-
- org.apache.activemq.command.Message
-
- org.apache.activemq.command.ActiveMQMessage
-
- org.apache.activemq.command.ActiveMQTextMessage
-
- All Implemented Interfaces:
Message,TextMessage,MessageReference,Command,DataStructure,MarshallAware,Message,ScheduledMessage
public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.activemq.command.Message
Message.MessageDestination
-
-
Field Summary
Fields Modifier and Type Field Description static byteDATA_STRUCTURE_TYPEprotected Stringtext-
Fields inherited from class org.apache.activemq.command.ActiveMQMessage
acknowledgeCallback, BROKER_PATH_PROPERTY, DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY
-
Fields inherited from class org.apache.activemq.command.Message
arrival, brokerInTime, brokerOutTime, compressed, content, correlationId, dataStructure, DEFAULT_MINIMUM_MESSAGE_SIZE, destination, droppable, expiration, groupID, groupSequence, jmsXGroupFirstForConsumer, marshalledProperties, messageId, ORIGINAL_EXPIRATION, originalDestination, originalTransactionId, persistent, priority, producerId, properties, readOnlyBody, readOnlyProperties, recievedByDFBridge, redeliveryCounter, replyTo, size, targetConsumerId, timestamp, transactionId, type, userID
-
Fields inherited from class org.apache.activemq.command.BaseCommand
commandId, responseRequired
-
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
-
Fields inherited from interface org.apache.activemq.ScheduledMessage
AMQ_SCHEDULED_CRON, AMQ_SCHEDULED_DELAY, AMQ_SCHEDULED_ID, AMQ_SCHEDULED_PERIOD, AMQ_SCHEDULED_REPEAT, AMQ_SCHEDULER_ACTION, AMQ_SCHEDULER_ACTION_BROWSE, AMQ_SCHEDULER_ACTION_END_TIME, AMQ_SCHEDULER_ACTION_REMOVE, AMQ_SCHEDULER_ACTION_REMOVEALL, AMQ_SCHEDULER_ACTION_START_TIME, AMQ_SCHEDULER_MANAGEMENT_DESTINATION
-
-
Constructor Summary
Constructors Constructor Description ActiveMQTextMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeMarshall(WireFormat wireFormat)voidclearBody()Clears out the message body.voidclearUnMarshalledState()Messagecopy()bytegetDataStructureType()StringgetJMSXMimeType()Returns the MIME type of this mesage.intgetSize()StringgetText()booleanisContentMarshalled()voidsetText(String text)voidstoreContent()voidstoreContentAndClear()StringtoString()-
Methods inherited from class org.apache.activemq.command.ActiveMQMessage
acknowledge, checkReadOnlyBody, checkReadOnlyProperties, checkValidObject, clearProperties, convertScheduled, copy, decodeString, encodeString, equals, getAcknowledgeCallback, getAllPropertyNames, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hashCode, onSend, propertyExists, setAcknowledgeCallback, setBooleanProperty, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setObjectProperty, setProperties, setShortProperty, setStringProperty, visit
-
Methods inherited from class org.apache.activemq.command.Message
afterMarshall, afterUnmarshall, beforeUnmarshall, canProcessAsExpired, compress, copy, decrementReferenceCount, doCompress, getArrival, getBrokerInTime, getBrokerOutTime, getBrokerPath, getCluster, getConnection, getContent, getCorrelationId, getDataStructure, getDestination, getExpiration, getGroupID, getGroupSequence, getMarshalledProperties, getMemoryUsage, getMessage, getMessageHardRef, getMessageId, getMinimumMessageSize, getOriginalDestination, getOriginalTransactionId, getPriority, getProducerId, getProperties, getProperty, getRedeliveryCounter, getReferenceCount, getRegionDestination, getReplyTo, getTargetConsumerId, getTimestamp, getTransactionId, getType, getUserID, incrementRedeliveryCounter, incrementReferenceCount, isAdvisory, isCompressed, isDroppable, isDropped, isExpired, isInTransaction, isJMSXGroupFirstForConsumer, isMarshallAware, isMarshalled, isMessage, isPersistent, isPropertiesMarshalled, isReadOnlyBody, isReadOnlyProperties, isRecievedByDFBridge, isRedelivered, lazyCreateProperties, onMessageRolledBack, removeProperty, setArrival, setBrokerInTime, setBrokerOutTime, setBrokerPath, setCluster, setCompressed, setConnection, setContent, setCorrelationId, setDataStructure, setDestination, setDroppable, setExpiration, setGroupID, setGroupSequence, setJMSXGroupFirstForConsumer, setMarshalledProperties, setMemoryUsage, setMessageId, setOriginalDestination, setOriginalTransactionId, setPersistent, setPriority, setProducerId, setProperty, setReadOnlyBody, setReadOnlyProperties, setRecievedByDFBridge, setRedelivered, setRedeliveryCounter, setRegionDestination, setReplyTo, setTargetConsumerId, setTimestamp, setTransactionId, setType, setUserID, toString
-
Methods inherited from class org.apache.activemq.command.BaseCommand
copy, getCommandId, getFrom, getTo, isBrokerInfo, isConnectionControl, isConsumerControl, isMessageAck, isMessageDispatch, isMessageDispatchNotification, isResponse, isResponseRequired, isShutdownInfo, isWireFormatInfo, setCommandId, setFrom, setResponseRequired, setTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.jms.Message
acknowledge, clearProperties, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty
-
-
-
-
Field Detail
-
DATA_STRUCTURE_TYPE
public static final byte DATA_STRUCTURE_TYPE
- See Also:
- Constant Field Values
-
text
protected String text
-
-
Method Detail
-
copy
public Message copy()
- Overrides:
copyin classActiveMQMessage
-
getDataStructureType
public byte getDataStructureType()
- Specified by:
getDataStructureTypein interfaceDataStructure- Overrides:
getDataStructureTypein classActiveMQMessage- Returns:
- The type of the data structure
-
getJMSXMimeType
public String getJMSXMimeType()
Description copied from interface:MessageReturns the MIME type of this mesage. This can be used in selectors to filter on the MIME types of the different JMS messages, or in the case ofBlobMessageit allows you to create a selector on the MIME type of the BLOB body- Specified by:
getJMSXMimeTypein interfaceMessage- Overrides:
getJMSXMimeTypein classActiveMQMessage
-
setText
public void setText(String text) throws MessageNotWriteableException
- Specified by:
setTextin interfaceTextMessage- Throws:
MessageNotWriteableException
-
getText
public String getText() throws JMSException
- Specified by:
getTextin interfaceTextMessage- Throws:
JMSException
-
beforeMarshall
public void beforeMarshall(WireFormat wireFormat) throws IOException
- Specified by:
beforeMarshallin interfaceMarshallAware- Overrides:
beforeMarshallin classMessage- Throws:
IOException
-
storeContentAndClear
public void storeContentAndClear()
- Overrides:
storeContentAndClearin classActiveMQMessage
-
storeContent
public void storeContent()
- Overrides:
storeContentin classActiveMQMessage
-
clearUnMarshalledState
public void clearUnMarshalledState() throws JMSException- Overrides:
clearUnMarshalledStatein classMessage- Throws:
JMSException
-
isContentMarshalled
public boolean isContentMarshalled()
- Overrides:
isContentMarshalledin classActiveMQMessage
-
clearBody
public void clearBody() throws JMSExceptionClears out the message body. Clearing a message's body does not clear its header values or property entries.If this message body was read-only, calling this method leaves the message body in the same state as an empty body in a newly created message.
- Specified by:
clearBodyin interfaceMessage- Overrides:
clearBodyin classActiveMQMessage- Throws:
JMSException- if the JMS provider fails to clear the message body due to some internal error.
-
getSize
public int getSize()
- Specified by:
getSizein interfaceMessageReference- Overrides:
getSizein classMessage
-
-