public class RMQTextMessage extends RMQMessage implements javax.jms.TextMessage
TextMessage interface.DEFAULT_MESSAGE_BODY_SIZE, logger, MSG_EOF, NOT_READABLE, NOT_WRITEABLE, UNABLE_TO_CAST| Constructor and Description |
|---|
RMQTextMessage() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearBodyInternal() |
protected <T> T |
doGetBody(java.lang.Class<T> c) |
java.lang.String |
getText() |
boolean |
isBodyAssignableTo(java.lang.Class c) |
protected void |
readAmqpBody(byte[] barr)
Invoked when an AMQP message is being transformed into a RMQMessage
The implementing class should only read its body by this method
|
protected void |
readBody(java.io.ObjectInput inputStream,
java.io.ByteArrayInputStream bin)
Invoked when a message is being deserialized to read and decode the message body.
|
static RMQMessage |
recreate(javax.jms.TextMessage msg) |
void |
setText(java.lang.String string) |
protected void |
writeAmqpBody(java.io.ByteArrayOutputStream out)
Invoked when
RMQMessage.toAmqpByteArray() is called to create
a byte[] from a message. |
void |
writeBody(java.io.ObjectOutput out,
java.io.ByteArrayOutputStream bout)
Invoked when
RMQMessage.toByteArray() is called to create
a byte[] from a message. |
acknowledge, clearBody, clearProperties, clone, copyAttributes, doNotDeclareReplyToDestination, equals, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getInternalID, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getRabbitDeliveryTag, getSession, getShortProperty, getStringProperty, hashCode, isReadonlyBody, isReadOnlyProperties, loggerDebugByteArray, propertyExists, readPrimitive, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setRabbitDeliveryTag, setReadonly, setReadOnlyBody, setReadOnlyProperties, setSession, setShortProperty, setStringProperty, writePrimitive, writePrimitivefinalize, getClass, notify, notifyAll, toString, wait, wait, waitacknowledge, clearBody, clearProperties, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringPropertypublic void setText(java.lang.String string)
throws javax.jms.JMSException
setText in interface javax.jms.TextMessagejavax.jms.JMSExceptionpublic java.lang.String getText()
throws javax.jms.JMSException
getText in interface javax.jms.TextMessagejavax.jms.JMSExceptionprotected void clearBodyInternal()
clearBodyInternal in class RMQMessagepublic void writeBody(java.io.ObjectOutput out,
java.io.ByteArrayOutputStream bout)
throws java.io.IOException
RMQMessage.toByteArray() is called to create
a byte[] from a message. Each subclass must implement this, but ONLY
write its specific body. All the properties defined in Message
will be written by the parent class.writeBody in class RMQMessageout - - the output stream to which the structured part of message body (scalar types) is writtenbout - - the output stream to which the un-structured part of message body (explicit bytes) is writtenjava.io.IOException - if the body can not be writtenprotected void readBody(java.io.ObjectInput inputStream,
java.io.ByteArrayInputStream bin)
throws java.io.IOException,
java.lang.ClassNotFoundException
readBody in class RMQMessageinputStream - - the stream to read its body frombin - - the underlying byte input streamjava.io.IOException - if a read error occurs on the input streamjava.lang.ClassNotFoundException - if the object class cannot be foundprotected void readAmqpBody(byte[] barr)
RMQMessagereadAmqpBody in class RMQMessagebarr - - the byte array payload of the AMQP messageprotected <T> T doGetBody(java.lang.Class<T> c)
throws javax.jms.JMSException
doGetBody in class RMQMessagejavax.jms.JMSExceptionprotected void writeAmqpBody(java.io.ByteArrayOutputStream out)
throws java.io.IOException
RMQMessageRMQMessage.toAmqpByteArray() is called to create
a byte[] from a message. Each subclass must implement this, but ONLY
write its specific body.writeAmqpBody in class RMQMessageout - - the output stream to which the message body is writtenjava.io.IOException - if the body can not be writtenpublic boolean isBodyAssignableTo(java.lang.Class c)
isBodyAssignableTo in interface javax.jms.Messagepublic static RMQMessage recreate(javax.jms.TextMessage msg) throws javax.jms.JMSException
javax.jms.JMSExceptionCopyright © 2022. All rights reserved.