org.apache.activemq.command
Class ActiveMQTextMessage

java.lang.Object
  extended by org.apache.activemq.command.BaseCommand
      extended by org.apache.activemq.command.Message
          extended by org.apache.activemq.command.ActiveMQMessage
              extended by org.apache.activemq.command.ActiveMQTextMessage
All Implemented Interfaces:
javax.jms.Message, javax.jms.TextMessage, MessageReference, Command, DataStructure, MarshallAware, ScheduledMessage

public class ActiveMQTextMessage
extends ActiveMQMessage
implements javax.jms.TextMessage


Field Summary
static byte DATA_STRUCTURE_TYPE
           
protected  java.lang.String text
           
 
Fields inherited from class org.apache.activemq.command.ActiveMQMessage
acknowledgeCallback, 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, marshalledProperties, messageId, 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
ActiveMQTextMessage()
           
 
Method Summary
 void beforeMarshall(WireFormat wireFormat)
           
 void clearBody()
          Clears out the message body.
 void clearMarshalledState()
           
 Message copy()
           
 byte getDataStructureType()
           
 java.lang.String getJMSXMimeType()
          Returns the MIME type of this mesage.
 int getSize()
           
 java.lang.String getText()
           
 void setText(java.lang.String text)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.activemq.command.ActiveMQMessage
acknowledge, checkReadOnlyBody, checkValidObject, checkValidScheduled, 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, copy, decrementReferenceCount, 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, isMarshallAware, isMessage, isPersistent, isReadOnlyBody, isReadOnlyProperties, isRecievedByDFBridge, isRedelivered, lazyCreateProperties, onMessageRolledBack, removeProperty, setArrival, setBrokerInTime, setBrokerOutTime, setBrokerPath, setCluster, setCompressed, setConnection, setContent, setCorrelationId, setDataStructure, setDestination, setDroppable, setExpiration, setGroupID, setGroupSequence, 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, 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 java.lang.String text
Constructor Detail

ActiveMQTextMessage

public ActiveMQTextMessage()
Method Detail

copy

public Message copy()
Overrides:
copy in class ActiveMQMessage

getDataStructureType

public byte getDataStructureType()
Specified by:
getDataStructureType in interface DataStructure
Overrides:
getDataStructureType in class ActiveMQMessage
Returns:
The type of the data structure

getJMSXMimeType

public java.lang.String getJMSXMimeType()
Description copied from interface: Message
Returns 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 of BlobMessage it allows you to create a selector on the MIME type of the BLOB body

Overrides:
getJMSXMimeType in class ActiveMQMessage

setText

public void setText(java.lang.String text)
             throws javax.jms.MessageNotWriteableException
Specified by:
setText in interface javax.jms.TextMessage
Throws:
javax.jms.MessageNotWriteableException

getText

public java.lang.String getText()
                         throws javax.jms.JMSException
Specified by:
getText in interface javax.jms.TextMessage
Throws:
javax.jms.JMSException

beforeMarshall

public void beforeMarshall(WireFormat wireFormat)
                    throws java.io.IOException
Specified by:
beforeMarshall in interface MarshallAware
Overrides:
beforeMarshall in class Message
Throws:
java.io.IOException

clearMarshalledState

public void clearMarshalledState()
                          throws javax.jms.JMSException
Overrides:
clearMarshalledState in class Message
Throws:
javax.jms.JMSException

clearBody

public void clearBody()
               throws javax.jms.JMSException
Clears 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:
clearBody in interface javax.jms.Message
Overrides:
clearBody in class ActiveMQMessage
Throws:
javax.jms.JMSException - if the JMS provider fails to clear the message body due to some internal error.

getSize

public int getSize()
Specified by:
getSize in interface MessageReference
Overrides:
getSize in class Message

toString

public java.lang.String toString()
Overrides:
toString in class Message


Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.