org.exolab.jmscts.jms.message
Class BasicObjectMessage

java.lang.Object
  |
  +--org.exolab.jmscts.jms.message.BasicMessage
        |
        +--org.exolab.jmscts.jms.message.BasicObjectMessage
All Implemented Interfaces:
javax.jms.Message, javax.jms.ObjectMessage

public class BasicObjectMessage
extends BasicMessage
implements javax.jms.ObjectMessage

This class provides a basic implementation of the javax.jms.ObjectMessage interface.

Version:
$Revision: 1.2 $ $Date: 2004/02/02 03:49:55 $
Author:
Tim Anderson
See Also:
ObjectMessage

Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Constructor Summary
BasicObjectMessage()
          Construct a new BasicObjectMessage
 
Method Summary
 void clearBody()
          Clear out the message body.
 java.io.Serializable getObject()
          Get the serializable object containing this message's data.
 void setObject(java.io.Serializable object)
          Set the serializable object containing this message's data.
 
Methods inherited from class org.exolab.jmscts.jms.message.BasicMessage
acknowledge, checkPropertyWrite, checkRead, checkWrite, clearProperties, getBodyReadOnly, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertiesReadOnly, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBodyReadOnly, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setPropertiesReadOnly, setReadOnly, setShortProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
 

Constructor Detail

BasicObjectMessage

public BasicObjectMessage()
Construct a new BasicObjectMessage
Method Detail

setObject

public final void setObject(java.io.Serializable object)
                     throws javax.jms.MessageFormatException,
                            javax.jms.MessageNotWriteableException
Set the serializable object containing this message's data. It is important to note that an ObjectMessage contains a snapshot of the object at the time setObject() is called - subsequent modifications of the object will have no affect on the ObjectMessage body.
Specified by:
setObject in interface javax.jms.ObjectMessage
Parameters:
object - the message's data
Throws:
javax.jms.MessageFormatException - if object serialization fails
javax.jms.MessageNotWriteableException - if the message is read-only

getObject

public final java.io.Serializable getObject()
                                     throws javax.jms.MessageFormatException
Get the serializable object containing this message's data. The default value is null.
Specified by:
getObject in interface javax.jms.ObjectMessage
Returns:
the serializable object containing this message's data
Throws:
javax.jms.MessageFormatException - if object deserialization fails

clearBody

public final void clearBody()
                     throws javax.jms.JMSException
Clear out the message body. Clearing a message's body does not clear its header values or property entries. If this message body was read-only, calling this method leaves the message body is in the same state as an empty body in a newly created message
Specified by:
clearBody in interface javax.jms.Message
Overrides:
clearBody in class BasicMessage
Throws:
javax.jms.JMSException - for any error


Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.