Class ObjectMessageImpl

java.lang.Object
com.swiftmq.jms.MessageImpl
com.swiftmq.jms.ObjectMessageImpl
All Implemented Interfaces:
Serializable, javax.jms.Message, javax.jms.ObjectMessage

public class ObjectMessageImpl extends MessageImpl implements 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:
  • Constructor Details

    • ObjectMessageImpl

      public ObjectMessageImpl()
  • Method Details

    • getType

      protected int getType()
      Overrides:
      getType in class MessageImpl
    • writeBody

      protected void writeBody(DataOutput out) throws IOException
      Overrides:
      writeBody in class MessageImpl
      Throws:
      IOException
    • readBody

      protected void readBody(DataInput in) throws IOException
      Overrides:
      readBody in class MessageImpl
      Throws:
      IOException
    • isUseThreadContextCL

      public boolean isUseThreadContextCL()
    • setUseThreadContextCL

      public void setUseThreadContextCL(boolean useThreadContextCL)
      Overrides:
      setUseThreadContextCL in class MessageImpl
    • getObject

      public Serializable getObject(ClassLoader customLoader) throws javax.jms.JMSException
      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 class MessageImpl
    • getObject

      public Serializable getObject() throws javax.jms.JMSException
      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
    • setObject

      public void setObject(Serializable obj) throws javax.jms.JMSException
      Set the serializable object containing this message's data.
      Specified by:
      setObject in interface javax.jms.ObjectMessage
      Parameters:
      object - the message's data
    • clearBody

      public void clearBody() throws javax.jms.JMSException
      Clear out the message body. All other parts of the message are left untouched.
      Specified by:
      clearBody in interface javax.jms.Message
      Overrides:
      clearBody in class MessageImpl
      Throws:
      javax.jms.JMSException - if JMS fails to due to some internal JMS error.
    • toString

      public String toString()
      Overrides:
      toString in class MessageImpl