Home » activemq-parent-5.3.1-source-release » org.apache » activemq » command » [javadoc | source]
org.apache.activemq.command
public class: ActiveMQObjectMessage [javadoc | source]
java.lang.Object
   org.apache.activemq.command.BaseCommand
      org.apache.activemq.command.Message
         org.apache.activemq.command.ActiveMQMessage
            org.apache.activemq.command.ActiveMQObjectMessage

All Implemented Interfaces:
    javax.jms.ObjectMessage, Message, MarshallAware, MessageReference, Command

An ObjectMessage object is used to send a message that contains a serializable object in the Java programming language ("Java object"). It inherits from the Message interface and adds a body containing a single reference to an object. Only Serializable Java objects can be used.

If a collection of Java objects must be sent, one of the Collection classes provided since JDK 1.2 can be used.

When a client receives an ObjectMessage, it is in read-only mode. If a client attempts to write to the message at this point, a MessageNotWriteableException is thrown. If clearBody is called, the message can now be both read from and written to.

Field Summary
public static final  byte DATA_STRUCTURE_TYPE     
static final  ClassLoader ACTIVEMQ_CLASSLOADER     
protected transient  Serializable object     
Fields inherited from org.apache.activemq.command.ActiveMQMessage:
DATA_STRUCTURE_TYPE,  acknowledgeCallback
Fields inherited from org.apache.activemq.command.Message:
DEFAULT_MINIMUM_MESSAGE_SIZE,  messageId,  originalDestination,  originalTransactionId,  producerId,  destination,  transactionId,  expiration,  timestamp,  arrival,  brokerInTime,  brokerOutTime,  correlationId,  replyTo,  persistent,  type,  priority,  groupID,  groupSequence,  targetConsumerId,  compressed,  userID,  content,  marshalledProperties,  dataStructure,  redeliveryCounter,  size,  properties,  readOnlyProperties,  readOnlyBody,  recievedByDFBridge,  droppable
Fields inherited from org.apache.activemq.command.BaseCommand:
commandId,  responseRequired
Method from org.apache.activemq.command.ActiveMQObjectMessage Summary:
clearBody,   copy,   getDataStructureType,   getJMSXMimeType,   getObject,   onMessageRolledBack,   setObject,   storeContent,   toString
Methods from org.apache.activemq.command.ActiveMQMessage:
acknowledge,   checkReadOnlyBody,   checkValidObject,   clearBody,   clearProperties,   copy,   copy,   decodeString,   encodeString,   equals,   getAcknowledgeCallback,   getBooleanProperty,   getByteProperty,   getDataStructureType,   getDoubleProperty,   getFloatProperty,   getIntProperty,   getJMSCorrelationID,   getJMSCorrelationIDAsBytes,   getJMSDeliveryMode,   getJMSDestination,   getJMSExpiration,   getJMSMessageID,   getJMSPriority,   getJMSRedelivered,   getJMSReplyTo,   getJMSTimestamp,   getJMSType,   getJMSXMimeType,   getLongProperty,   getObjectProperty,   getPropertyNames,   getShortProperty,   getStringProperty,   hashCode,   onSend,   propertyExists,   setAcknowledgeCallback,   setBooleanProperty,   setBooleanProperty,   setByteProperty,   setDoubleProperty,   setFloatProperty,   setIntProperty,   setJMSCorrelationID,   setJMSCorrelationIDAsBytes,   setJMSDeliveryMode,   setJMSDestination,   setJMSExpiration,   setJMSMessageID,   setJMSMessageID,   setJMSPriority,   setJMSRedelivered,   setJMSReplyTo,   setJMSTimestamp,   setJMSType,   setLongProperty,   setObjectProperty,   setObjectProperty,   setProperties,   setShortProperty,   setStringProperty,   visit
Methods from org.apache.activemq.command.Message:
afterMarshall,   afterUnmarshall,   beforeMarshall,   beforeUnmarshall,   clearBody,   clearProperties,   copy,   copy,   decrementReferenceCount,   getArrival,   getBrokerInTime,   getBrokerOutTime,   getBrokerPath,   getCluster,   getConnection,   getContent,   getCorrelationId,   getDataStructure,   getDestination,   getExpiration,   getGroupID,   getGroupSequence,   getMarshalledProperties,   getMemoryUsage,   getMessage,   getMessageHardRef,   getMessageId,   getMinimumMessageSize,   getOriginalDestination,   getOriginalTransactionId,   getPriority,   getProducerId,   getProperties,   getProperty,   getRedeliveryCounter,   getReferenceCount,   getRegionDestination,   getReplyTo,   getSize,   getTargetConsumerId,   getTimestamp,   getTransactionId,   getType,   getUserID,   incrementRedeliveryCounter,   incrementReferenceCount,   isAdvisory,   isCompressed,   isDroppable,   isDropped,   isExpired,   isInTransaction,   isMarshallAware,   isMessage,   isPersistent,   isReadOnlyBody,   isReadOnlyProperties,   isRecievedByDFBridge,   isRedelivered,   lazyCreateProperties,   onMessageRolledBack,   setArrival,   setBrokerInTime,   setBrokerOutTime,   setBrokerPath,   setCluster,   setCompressed,   setConnection,   setContent,   setCorrelationId,   setDataStructure,   setDestination,   setDroppable,   setExpiration,   setGroupID,   setGroupSequence,   setMarshalledProperties,   setMemoryUsage,   setMessageId,   setOriginalDestination,   setOriginalTransactionId,   setPersistent,   setPriority,   setProducerId,   setProperty,   setReadOnlyBody,   setReadOnlyProperties,   setRecievedByDFBridge,   setRedelivered,   setRedeliveryCounter,   setRegionDestination,   setReplyTo,   setTargetConsumerId,   setTimestamp,   setTransactionId,   setType,   setUserID,   toString,   toString
Methods from org.apache.activemq.command.BaseCommand:
copy,   getCommandId,   getFrom,   getTo,   isBrokerInfo,   isMarshallAware,   isMessage,   isMessageAck,   isMessageDispatch,   isMessageDispatchNotification,   isResponse,   isResponseRequired,   isShutdownInfo,   isWireFormatInfo,   setCommandId,   setFrom,   setResponseRequired,   setTo,   toString,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.activemq.command.ActiveMQObjectMessage Detail:
 public  void clearBody() throws JMSException 
    Clears 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 in the same state as an empty body in a newly created message.

 public Message copy() 
 public byte getDataStructureType() 
 public String getJMSXMimeType() 
 public Serializable getObject() throws JMSException 
    Gets the serializable object containing this message's data. The default value is null.
 public  void onMessageRolledBack() 
 public  void setObject(Serializable newObject) throws JMSException 
    Sets 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 effect on the ObjectMessage body.
 public  void storeContent() 
 public String toString()