Package com.swiftmq.jms
Class ObjectMessageImpl
- java.lang.Object
-
- com.swiftmq.jms.MessageImpl
-
- com.swiftmq.jms.ObjectMessageImpl
-
- All Implemented Interfaces:
jakarta.jms.Message,jakarta.jms.ObjectMessage,java.io.Serializable
public class ObjectMessageImpl extends MessageImpl implements jakarta.jms.ObjectMessage
Implementation of a ObjectMessage. There is one additional methodgetObject(classLoader)which must be used by Extension Swiftlet, passing their own classloader to construct the object. This is required due to hot deployment of Extension Swiftlets and different class loaders.- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.swiftmq.jms.MessageImpl
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY, PROP_CLIENT_ID, PROP_DELIVERY_COUNT, PROP_DOUBT_DUPLICATE, PROP_UNROUTABLE_REASON, PROP_USER_ID
-
-
Constructor Summary
Constructors Constructor Description ObjectMessageImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearBody()Clear out the message body.java.io.SerializablegetObject()Get the serializable object containing this message's data.java.io.SerializablegetObject(java.lang.ClassLoader customLoader)Get the serializable object containing this message's data.protected intgetType()booleanisUseThreadContextCL()protected voidreadBody(java.io.DataInput in)voidsetObject(java.io.Serializable obj)Set the serializable object containing this message's data.voidsetReadOnly(boolean b)voidsetUseThreadContextCL(boolean useThreadContextCL)java.lang.StringtoString()protected voidwriteBody(java.io.DataOutput out)-
Methods inherited from class com.swiftmq.jms.MessageImpl
acknowledge, clearProperties, clearSwiftMQAllProps, clearSwiftMQProps, createInstance, getBody, getBooleanProperty, getByteProperty, getDestQueue, getDestRouter, getDoubleProperty, getDuplicateId, getField, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getMessageIndex, getMessageLength, getObjectProperty, getPersistentKey, getPropertyNames, getShortProperty, getSourceRouter, getStreamPKey, getStringProperty, isBodyAssignableTo, isCancelled, propertyExists, readContent, readContent, removeProperty, reset, setBooleanProperty, setByteProperty, setDestQueue, setDestRouter, setDoubleProperty, setDuplicateId, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setMessageConsumerImpl, setMessageIndex, setObjectProperty, setPersistentKey, setSessionImpl, setShortProperty, setSourceRouter, setStreamPKey, setStringProperty, unfoldBody, unfoldBuffers, writeContent, writeContent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jakarta.jms.Message
acknowledge, clearProperties, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, isBodyAssignableTo, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty
-
-
-
-
Method Detail
-
getType
protected int getType()
- Overrides:
getTypein classMessageImpl
-
writeBody
protected void writeBody(java.io.DataOutput out) throws java.io.IOException- Overrides:
writeBodyin classMessageImpl- Throws:
java.io.IOException
-
readBody
protected void readBody(java.io.DataInput in) throws java.io.IOException- Overrides:
readBodyin classMessageImpl- Throws:
java.io.IOException
-
isUseThreadContextCL
public boolean isUseThreadContextCL()
-
setUseThreadContextCL
public void setUseThreadContextCL(boolean useThreadContextCL)
- Overrides:
setUseThreadContextCLin classMessageImpl
-
getObject
public java.io.Serializable getObject(java.lang.ClassLoader customLoader) throws jakarta.jms.JMSExceptionGet the serializable object containing this message's data. The default value is null.- Parameters:
customLoader- a custom class loader to load the class- Returns:
- the serializable object containing this message's data
- Throws:
jakarta.jms.JMSException- if JMS fails to get object due to some internal JMS error.MessageFormatException- if object deserialization fails
-
setReadOnly
public void setReadOnly(boolean b)
- Overrides:
setReadOnlyin classMessageImpl
-
getObject
public java.io.Serializable getObject() throws jakarta.jms.JMSExceptionGet the serializable object containing this message's data. The default value is null.- Specified by:
getObjectin interfacejakarta.jms.ObjectMessage- Returns:
- the serializable object containing this message's data
- Throws:
jakarta.jms.JMSException- if JMS fails to get object due to some internal JMS error.MessageFormatException- if object deserialization fails
-
setObject
public void setObject(java.io.Serializable obj) throws jakarta.jms.JMSExceptionSet the serializable object containing this message's data.- Specified by:
setObjectin interfacejakarta.jms.ObjectMessage- Parameters:
object- the message's data- Throws:
jakarta.jms.JMSException- if JMS fails to set object due to some internal JMS error.MessageFormatException- if object serialization failsjakarta.jms.MessageNotWriteableException- if message in read-only mode.
-
clearBody
public void clearBody() throws jakarta.jms.JMSExceptionClear out the message body. All other parts of the message are left untouched.- Specified by:
clearBodyin interfacejakarta.jms.Message- Overrides:
clearBodyin classMessageImpl- Throws:
jakarta.jms.JMSException- if JMS fails to due to some internal JMS error.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classMessageImpl
-
-