Package com.swiftmq.jms
Class ObjectMessageImpl
java.lang.Object
com.swiftmq.jms.MessageImpl
com.swiftmq.jms.ObjectMessageImpl
- All Implemented Interfaces:
Serializable
,javax.jms.Message
,javax.jms.ObjectMessage
Implementation of a ObjectMessage. There is one additional method
getObject(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:
-
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
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear out the message body.Get the serializable object containing this message's data.getObject
(ClassLoader customLoader) Get the serializable object containing this message's data.protected int
getType()
boolean
protected void
void
setObject
(Serializable obj) Set the serializable object containing this message's data.void
setReadOnly
(boolean b) void
setUseThreadContextCL
(boolean useThreadContextCL) toString()
protected void
writeBody
(DataOutput out) Methods inherited from class com.swiftmq.jms.MessageImpl
acknowledge, clearProperties, clearSwiftMQAllProps, clearSwiftMQProps, createInstance, getBooleanProperty, getByteProperty, getDestQueue, getDestRouter, getDoubleProperty, getDuplicateId, getField, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getMessageIndex, getMessageLength, getObjectProperty, getPersistentKey, getPropertyNames, getShortProperty, getSourceRouter, getStreamPKey, getStringProperty, isCancelled, propertyExists, readContent, readContent, removeProperty, reset, setBooleanProperty, setByteProperty, setDestQueue, setDestRouter, setDoubleProperty, setDuplicateId, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, 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 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 Details
-
ObjectMessageImpl
public ObjectMessageImpl()
-
-
Method Details
-
getType
protected int getType()- Overrides:
getType
in classMessageImpl
-
writeBody
- Overrides:
writeBody
in classMessageImpl
- Throws:
IOException
-
readBody
- Overrides:
readBody
in classMessageImpl
- Throws:
IOException
-
isUseThreadContextCL
public boolean isUseThreadContextCL() -
setUseThreadContextCL
public void setUseThreadContextCL(boolean useThreadContextCL) - Overrides:
setUseThreadContextCL
in classMessageImpl
-
getObject
Get 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
-
setReadOnly
public void setReadOnly(boolean b) - Overrides:
setReadOnly
in classMessageImpl
-
getObject
Get the serializable object containing this message's data. The default value is null.- Specified by:
getObject
in interfacejavax.jms.ObjectMessage
- Returns:
- the serializable object containing this message's data
-
setObject
Set the serializable object containing this message's data.- Specified by:
setObject
in interfacejavax.jms.ObjectMessage
- Parameters:
object
- the message's data
-
clearBody
public void clearBody() throws javax.jms.JMSExceptionClear out the message body. All other parts of the message are left untouched.- Specified by:
clearBody
in interfacejavax.jms.Message
- Overrides:
clearBody
in classMessageImpl
- Throws:
javax.jms.JMSException
- if JMS fails to due to some internal JMS error.
-
toString
- Overrides:
toString
in classMessageImpl
-