Package com.swiftmq.jms
Class TextMessageImpl
- java.lang.Object
-
- com.swiftmq.jms.MessageImpl
-
- com.swiftmq.jms.TextMessageImpl
-
- All Implemented Interfaces:
java.io.Serializable
,javax.jms.Message
,javax.jms.TextMessage
public class TextMessageImpl extends MessageImpl implements javax.jms.TextMessage
Implementation of a TextMessage.- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.swiftmq.jms.MessageImpl
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY, PROP_CLIENT_ID, PROP_DELIVERY_COUNT, PROP_DOUBT_DUPLICATE, PROP_UNROUTABLE_REASON, PROP_USER_ID
-
-
Constructor Summary
Constructors Constructor Description TextMessageImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearBody()
Clear out the message body.java.lang.String
getText()
Get the string containing this message's data.protected int
getType()
protected void
readBody(java.io.DataInput in)
void
setReadOnly(boolean b)
void
setText(java.lang.String s)
Set the string containing this message's data.java.lang.String
toString()
protected void
unfoldBody()
protected void
writeBody(java.io.DataOutput out)
-
Methods inherited from class com.swiftmq.jms.MessageImpl
acknowledge, clearProperties, clearSwiftMQAllProps, clearSwiftMQProps, createInstance, getBooleanProperty, getByteProperty, getDestQueue, getDestRouter, getDoubleProperty, getDuplicateId, getField, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getMessageIndex, getMessageLength, getObjectProperty, getPersistentKey, getPropertyNames, getShortProperty, getSourceRouter, getStreamPKey, getStringProperty, isCancelled, propertyExists, readContent, readContent, removeProperty, reset, setBooleanProperty, setByteProperty, setDestQueue, setDestRouter, setDoubleProperty, setDuplicateId, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setMessageConsumerImpl, setMessageIndex, setObjectProperty, setPersistentKey, setSessionImpl, setShortProperty, setSourceRouter, setStreamPKey, setStringProperty, setUseThreadContextCL, unfoldBuffers, writeContent, writeContent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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
-
-
-
-
Method Detail
-
getType
protected int getType()
- Overrides:
getType
in classMessageImpl
-
unfoldBody
protected void unfoldBody()
- Overrides:
unfoldBody
in classMessageImpl
-
writeBody
protected void writeBody(java.io.DataOutput out) throws java.io.IOException
- Overrides:
writeBody
in classMessageImpl
- Throws:
java.io.IOException
-
readBody
protected void readBody(java.io.DataInput in) throws java.io.IOException
- Overrides:
readBody
in classMessageImpl
- Throws:
java.io.IOException
-
getText
public java.lang.String getText() throws javax.jms.JMSException
Get the string containing this message's data. The default value is null.- Specified by:
getText
in interfacejavax.jms.TextMessage
- Returns:
- the String containing the message's data
- Throws:
javax.jms.JMSException
- if JMS fails to get text due to some internal JMS error.
-
setText
public void setText(java.lang.String s) throws javax.jms.JMSException
Set the string containing this message's data.- Specified by:
setText
in interfacejavax.jms.TextMessage
- Parameters:
s
- the String containing the message's data- Throws:
javax.jms.JMSException
- if JMS fails to set text due to some internal JMS error.javax.jms.MessageNotWriteableException
- if message in read-only mode.
-
setReadOnly
public void setReadOnly(boolean b)
- Overrides:
setReadOnly
in classMessageImpl
-
clearBody
public void clearBody() throws javax.jms.JMSException
Clear out the message body. All other parts of the message are left untouched.- Specified by:
clearBody
in interfacejavax.jms.Message
- Overrides:
clearBody
in classMessageImpl
- Throws:
javax.jms.JMSException
- if JMS fails to due to some internal JMS error.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classMessageImpl
-
-