|
|||||||||
| Home >> All >> org >> activemq >> [ message overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.activemq.message
Class ActiveMQTextMessage

java.lang.Objectorg.activemq.message.AbstractPacket
org.activemq.message.ActiveMQMessage
org.activemq.message.ActiveMQTextMessage
- All Implemented Interfaces:
- BodyPacket, java.lang.Comparable, org.activemq.io.util.MemoryManageable, javax.jms.Message, Packet, javax.jms.TextMessage
- public class ActiveMQTextMessage
- extends ActiveMQMessage
- implements javax.jms.TextMessage
- extends ActiveMQMessage
A TextMessage object is used to send a message containing a
java.lang.String.
It inherits from the Message interface and adds a text message
body.
This message type can be used to transport text-based messages, including those with XML content.
When a client receives a TextMessage, it is in read-only
mode. If a client attempts to write to the message at this point, a
MessageNotWriteableException is thrown. If
clearBody is
called, the message can now be both read from and written to.
| Field Summary | |
private java.lang.String |
text
|
| Fields inherited from class org.activemq.message.ActiveMQMessage |
BOOLEAN, BROKER_NAME_INDEX, BYTE, BYTES, CACHED_DESTINATION_INDEX, CACHED_VALUES_INDEX, CHAR, CID_INDEX, CLUSTER_NAME_INDEX, CORRELATION_INDEX, DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE, DISPATCHED_FROM_DLQ_INDEX, DOUBLE, EOF, EXPIRATION_INDEX, EXTERNAL_MESSAGE_ID_INDEX, FLOAT, INT, LONG, LONG_SEQUENCE_INDEX, MESSAGE_PART_INDEX, NULL, PAYLOAD_INDEX, PROPERTIES_INDEX, readOnlyMessage, REDELIVERED_INDEX, REPLY_TO_INDEX, SHORT, STRING, TIMESTAMP_INDEX, TRANSACTION_ID_INDEX, TYPE_INDEX, XA_TRANS_INDEX |
| Fields inherited from class org.activemq.message.AbstractPacket |
bitArray, BROKERS_VISITED_INDEX, cachedHashCode, RECEIPT_REQUIRED_INDEX |
| Fields inherited from interface javax.jms.Message |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
| Constructor Summary | |
ActiveMQTextMessage()
|
|
| Method Summary | |
void |
clearBody()
Clears out the message body. |
ActiveMQMessage |
deepCopy()
|
int |
getPacketType()
Return the type of Packet |
java.lang.String |
getText()
Gets the string containing this message's data. |
void |
readBody(java.io.DataInput dataIn)
Used to help build the body from an input stream |
void |
readText(java.io.DataInput dataIn)
read the text as UTF-8 |
void |
setText(java.lang.String string)
Sets the string containing this message's data. |
ActiveMQMessage |
shallowCopy()
|
java.lang.String |
toString()
Convert this Object to a human-readable String. |
void |
writeBody(java.io.DataOutput dataOut)
Used serialize the message body to an output stream |
void |
writeText(java.io.DataOutput dataOut)
dumps the text body as UTF-8 |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.activemq.io.util.MemoryManageable |
decrementMemoryReferenceCount, getMemoryUsage, getMemoryUsageReferenceCount, incrementMemoryReferenceCount |
| Field Detail |
text
private java.lang.String text
| Constructor Detail |
ActiveMQTextMessage
public ActiveMQTextMessage()
| Method Detail |
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).- Overrides:
toStringin classActiveMQMessage
getPacketType
public int getPacketType()
- Return the type of Packet
- Specified by:
getPacketTypein interfacePacket- Overrides:
getPacketTypein classActiveMQMessage
shallowCopy
public ActiveMQMessage shallowCopy() throws javax.jms.JMSException
- Overrides:
shallowCopyin classActiveMQMessage
deepCopy
public ActiveMQMessage deepCopy() throws javax.jms.JMSException
- Overrides:
deepCopyin classActiveMQMessage
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:
clearBodyin interfacejavax.jms.Message- Overrides:
clearBodyin classActiveMQMessage
setText
public void setText(java.lang.String string) throws javax.jms.JMSException
- Sets the string containing this message's data.
- Specified by:
setTextin interfacejavax.jms.TextMessage
getText
public java.lang.String getText() throws javax.jms.JMSException
- Gets the string containing this message's data. The default
value is null.
- Specified by:
getTextin interfacejavax.jms.TextMessage
writeBody
public void writeBody(java.io.DataOutput dataOut) throws java.io.IOException
- Used serialize the message body to an output stream
- Specified by:
writeBodyin interfaceBodyPacket- Overrides:
writeBodyin classActiveMQMessage
readBody
public void readBody(java.io.DataInput dataIn) throws java.io.IOException
- Used to help build the body from an input stream
- Specified by:
readBodyin interfaceBodyPacket- Overrides:
readBodyin classActiveMQMessage
writeText
public void writeText(java.io.DataOutput dataOut) throws java.io.IOException
- dumps the text body as UTF-8
readText
public void readText(java.io.DataInput dataIn) throws java.io.IOException
- read the text as UTF-8
|
|||||||||
| Home >> All >> org >> activemq >> [ message overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC