public class RMQObjectMessage extends RMQMessage implements javax.jms.ObjectMessage
ObjectMessage interface.DEFAULT_MESSAGE_BODY_SIZE, logger, MSG_EOF, NOT_READABLE, NOT_WRITEABLE, UNABLE_TO_CAST| Constructor and Description |
|---|
RMQObjectMessage() |
RMQObjectMessage(java.util.List<java.lang.String> trustedPackages) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearBodyInternal() |
protected <T> T |
doGetBody(java.lang.Class<T> c) |
java.io.Serializable |
getObject() |
java.io.Serializable |
getObject(java.util.List<java.lang.String> trustedPackages) |
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.ObjectMessage msg) |
static RMQMessage |
recreate(RMQObjectMessage msg,
java.util.List<java.lang.String> patterns) |
void |
setObject(java.io.Serializable object) |
protected void |
writeAmqpBody(java.io.ByteArrayOutputStream out)
Invoked when
RMQMessage.toAmqpByteArray() is called to create
a byte[] from a message. |
protected 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 RMQObjectMessage()
public RMQObjectMessage(java.util.List<java.lang.String> trustedPackages)
public void setObject(java.io.Serializable object)
throws javax.jms.JMSException
setObject in interface javax.jms.ObjectMessagejavax.jms.JMSExceptionpublic java.io.Serializable getObject()
throws javax.jms.JMSException
getObject in interface javax.jms.ObjectMessagejavax.jms.JMSExceptionpublic java.io.Serializable getObject(java.util.List<java.lang.String> trustedPackages)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void clearBodyInternal()
throws javax.jms.JMSException
clearBodyInternal in class RMQMessagejavax.jms.JMSExceptionprotected void writeBody(java.io.ObjectOutput out,
java.io.ByteArrayOutputStream bout)
throws java.io.IOException
RMQMessageRMQMessage.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
RMQMessagereadBody 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 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 static RMQMessage recreate(javax.jms.ObjectMessage msg) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic static RMQMessage recreate(RMQObjectMessage msg, java.util.List<java.lang.String> patterns) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic boolean isBodyAssignableTo(java.lang.Class c)
throws javax.jms.JMSException
isBodyAssignableTo in interface javax.jms.Messagejavax.jms.JMSExceptionprotected <T> T doGetBody(java.lang.Class<T> c)
throws javax.jms.JMSException
doGetBody in class RMQMessagejavax.jms.JMSExceptionCopyright © 2022. All rights reserved.