Class DynamicClassLoaderMessage

  • All Implemented Interfaces:
    java.io.Serializable

    class DynamicClassLoaderMessage
    extends java.lang.Object
    implements java.io.Serializable
    Wraps an object when it is being sent over a channel by the DataSerializationFilter so that it includes a NetChannelLocation referring to the JFTP request channel to service requests for the class's binary image if it is not held at the receiving end.
    • Constructor Summary

      Constructors 
      Constructor Description
      DynamicClassLoaderMessage​(java.lang.Object data, NetChannelLocation classSourceChannelLoc)
      Creates a new DynamicClassLoaderMessage encapsulating the given object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(ClassManager cm)
      Public accessor to deserialize and retrieve the object using the specified ClassManager.
      void setClassLoader​(java.lang.ClassLoader classLoader)
      Sets the class loader to use when deserializing the object.
      java.lang.String toString()
      Diagnostic string identifying the message by timestamp.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • createTime

        private long createTime
        Creation timestamp.
      • classLoaderToUse

        private transient java.lang.ClassLoader classLoaderToUse
        The class loader to use when deserializing the object. This is not sent as part of the message - it is for use by methods invoked by the receiver.
      • classSourceChannelLoc

        private final NetChannelLocation classSourceChannelLoc
        The location of the request channel of the sender's JFTP process.
      • serializedData

        private SerializedData serializedData
        The serialized form of the user object being sent.
    • Constructor Detail

      • DynamicClassLoaderMessage

        public DynamicClassLoaderMessage​(java.lang.Object data,
                                         NetChannelLocation classSourceChannelLoc)
                                  throws java.io.NotSerializableException,
                                         java.io.IOException
        Creates a new DynamicClassLoaderMessage encapsulating the given object.
        Parameters:
        data - the actual user object being sent.
        classSourceChannelLoc - the request channel of the JFTP process.
        Throws:
        java.io.NotSerializableException
        java.io.IOException
    • Method Detail

      • toString

        public java.lang.String toString()
        Diagnostic string identifying the message by timestamp.
        Overrides:
        toString in class java.lang.Object
      • get

        public java.lang.Object get​(ClassManager cm)
                             throws java.lang.ClassNotFoundException,
                                    java.io.IOException
        Public accessor to deserialize and retrieve the object using the specified ClassManager.
        Parameters:
        cm - the class manager to use.
        Returns:
        the user object passed in this message.
        Throws:
        java.lang.ClassNotFoundException
        java.io.IOException
      • setClassLoader

        public void setClassLoader​(java.lang.ClassLoader classLoader)
        Sets the class loader to use when deserializing the object.
        Parameters:
        classLoader - the new class loader.