|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.jms.MQeMessage | +--com.ibm.mqe.jms.MQeTextMessage
A TextMessage
is used to send a message containing a
String
. It inherits from MQeMessage
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.
BytesMessage
,
Message
,
MapMessage
,
ObjectMessage
,
StreamMessage
Field Summary |
Fields inherited from class com.ibm.mqe.jms.MQeMessage |
DEFAULT_DELIVERY_MODE |
Fields inherited from interface javax.jms.Message |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
Constructor Summary | |
MQeTextMessage(java.lang.String string)
Constructs a JMS TextMessage and sets its value to the given String. |
Method Summary | |
void |
clearBody()
Clear the message body and set the message to be writeable. |
java.lang.String |
getText()
Get the text contained in the message body. |
void |
setText(java.lang.String string)
Set the string containing this message's data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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 |
Constructor Detail |
public MQeTextMessage(java.lang.String string) throws javax.jms.JMSException
string
- java.lang.String
javax.jms.JMSException
- if the message is not created.Method Detail |
public void setText(java.lang.String string) throws javax.jms.JMSException
setText
in interface javax.jms.TextMessage
string
- the String containing the message's data
javax.jms.JMSException
- if JMS fails to set the text due to
some internal JMS error.
javax.jms.MessageNotWriteableException
- if message in read-only mode.public java.lang.String getText() throws javax.jms.JMSException
getText
in interface javax.jms.TextMessage
javax.jms.JMSException
- if the attempt to get the text fails due to an internal error.public void clearBody() throws javax.jms.JMSException
clearBody
in interface javax.jms.Message
clearBody
in class MQeMessage
javax.jms.JMSException
- if we fail due to an internal error
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |