public class HornetQObjectMessage extends HornetQMessage implements ObjectMessage
| Modifier and Type | Field and Description |
|---|---|
static byte |
TYPE |
message, propertiesReadOnly, readOnlyDEFAULT_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, setInputStream, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setOutputStream, setShortProperty, setStringProperty, toString, waitCompletionOnStreamclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacknowledge, 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, setStringPropertypublic static final byte TYPE
protected HornetQObjectMessage(ClientSession session)
protected HornetQObjectMessage(ClientMessage message, ClientSession session)
public HornetQObjectMessage(ObjectMessage foreign, ClientSession session) throws JMSException
JMSExceptionpublic byte getType()
getType in class HornetQMessagepublic void doBeforeSend()
throws Exception
doBeforeSend in class HornetQMessageExceptionpublic void doBeforeReceive()
throws Exception
doBeforeReceive in class HornetQMessageExceptionpublic void setObject(Serializable object) throws JMSException
ObjectMessageObjectMessage
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 ObjectMessageobject - 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
ObjectMessagegetObject in interface ObjectMessageJMSException - if the JMS provider fails to get the object
due to some internal error.MessageFormatException - if object deserialization fails.public void clearBody()
throws JMSException
MessageIf 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 MessageclearBody in class HornetQMessageJMSException - if the JMS provider fails to clear the message
body due to some internal error.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.