public class HornetQObjectMessage extends HornetQMessage implements ObjectMessage
Modifier and Type | Field and Description |
---|---|
static byte |
TYPE |
message, propertiesReadOnly, readOnly
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
Modifier | Constructor and Description |
---|---|
protected |
HornetQObjectMessage(ClientMessage message,
ClientSession session) |
protected |
HornetQObjectMessage(ClientSession session) |
|
HornetQObjectMessage(ObjectMessage foreign,
ClientSession session)
A copy constructor for foreign JMS ObjectMessages.
|
Modifier and Type | Method and Description |
---|---|
void |
clearBody()
Clears out the message body.
|
void |
doBeforeReceive() |
void |
doBeforeSend() |
Serializable |
getObject()
Gets the serializable object containing this message's data.
|
byte |
getType() |
void |
setObject(Serializable object)
Sets the serializable object containing this message's data.
|
acknowledge, checkBuffer, checkRead, checkWrite, clearProperties, coreMaptoJMSMap, createMessage, getBooleanProperty, getByteProperty, getCoreMessage, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, resetMessageID, saveToOutputStream, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIndividualAcknowledge, setInputStream, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setOutputStream, setShortProperty, setStringProperty, toString, waitCompletionOnStream
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
public static final byte TYPE
protected HornetQObjectMessage(ClientSession session)
protected HornetQObjectMessage(ClientMessage message, ClientSession session)
public HornetQObjectMessage(ObjectMessage foreign, ClientSession session) throws JMSException
JMSException
public byte getType()
getType
in class HornetQMessage
public void doBeforeSend() throws Exception
doBeforeSend
in class HornetQMessage
Exception
public void doBeforeReceive() throws HornetQException
doBeforeReceive
in class HornetQMessage
HornetQException
public void setObject(Serializable object) throws JMSException
ObjectMessage
ObjectMessage
contains a snapshot of the object at the time setObject()
is called; subsequent modifications of the object will have no
effect on the ObjectMessage
body.setObject
in interface ObjectMessage
object
- the message's dataJMSException
- if the JMS provider fails to set the object
due to some internal error.MessageFormatException
- if object serialization fails.MessageNotWriteableException
- if the message is in read-only
mode.public Serializable getObject() throws JMSException
ObjectMessage
getObject
in interface ObjectMessage
JMSException
- if the JMS provider fails to get the object
due to some internal error.MessageFormatException
- if object deserialization fails.public void clearBody() throws JMSException
Message
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.
clearBody
in interface Message
clearBody
in class HornetQMessage
JMSException
- if the JMS provider fails to clear the message
body due to some internal error.Copyright © 2018 JBoss by Red Hat. All rights reserved.