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

public class ActiveMQTextMessage
extends ActiveMQMessage
implements javax.jms.TextMessage

Version:
$Revision$

Field Summary
static byte DATA_STRUCTURE_TYPE
           
protected  java.lang.String text
           
 
Fields inherited from class org.apache.activemq.command.ActiveMQMessage
acknowledgeCallback
 
Fields inherited from class org.apache.activemq.command.Message
arrival, AVERAGE_MESSAGE_SIZE_OVERHEAD, compressed, content, correlationId, dataStructure, 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
 
Constructor Summary
ActiveMQTextMessage()
           
 
Method Summary
 void beforeMarshall(WireFormat wireFormat)
           
 void clearBody()
          Clears out the message body.
 Message copy()
           
 byte getDataStructureType()
           
 int getSize()
           
 java.lang.String getText()
           
 void setText(java.lang.String text)
           
 
Methods inherited from class org.apache.activemq.command.ActiveMQMessage
acknowledge, checkReadOnlyBody, checkValidObject, clearProperties, copy, decodeString, encodeString, equals, getAcknowledgeCallback, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hashCode, isExpired, onSend, propertyExists, setAcknowledgeCallback, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setProperties, setShortProperty, setStringProperty, visit
 
Methods inherited from class org.apache.activemq.command.Message
afterMarshall, afterUnmarshall, beforeUnmarshall, copy, decrementReferenceCount, evictMarshlledForm, getArrival, getBrokerPath, getCachedMarshalledForm, getConnection, getContent, getCorrelationId, getDataStructure, getDestination, getExpiration, getGroupID, getGroupSequence, getMarshalledProperties, getMessage, getMessageHardRef, getMessageId, getOriginalDestination, getOriginalTransactionId, getPriority, getProducerId, getProperties, getProperty, getRedeliveryCounter, getReferenceCount, getRegionDestination, getReplyTo, getTargetConsumerId, getTimestamp, getTransactionId, getType, getUserID, incrementRedeliveryCounter, incrementReferenceCount, isAdvisory, isCompressed, isDroppable, isInTransaction, isMarshallAware, isPersistent, isReadOnlyBody, isReadOnlyProperties, isRecievedByDFBridge, isRedelivered, lazyCreateProperties, onMessageRolledBack, setArrival, setBrokerPath, setCachedMarshalledForm, setCompressed, setConnection, setContent, setCorrelationId, setDataStructure, setDestination, setDroppable, setExpiration, setGroupID, setGroupSequence, setMarshalledProperties, setMessageId, setOriginalDestination, setOriginalTransactionId, setPersistent, setPriority, setProducerId, setProperty, setReadOnlyBody, setReadOnlyProperties, setRecievedByDFBridge, setRedelivered, setRedeliveryCounter, setRegionDestination, setReplyTo, setTargetConsumerId, setTimestamp, setTransactionId, setType, setUserID
 
Methods inherited from class org.apache.activemq.command.BaseCommand
copy, getCommandId, getFrom, getTo, isBrokerInfo, isMessage, isMessageAck, isMessageDispatch, isMessageDispatchNotification, isResponse, isResponseRequired, isShutdownInfo, isWireFormatInfo, setCommandId, setFrom, setResponseRequired, setTo, toString
 
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

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

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


Copyright © 2010 Apache Software Foundation. All Rights Reserved.