Class DataSerializationFilter

java.lang.Object
org.jcsp.net.dynamic.DataSerializationFilter
All Implemented Interfaces:
Filter

class DataSerializationFilter extends Object implements Filter

A filter to be plugged into the sending end of a channel if dynamic class transfer is to be supported over the channel. The receiving end of the channel should have a DeserializeChannelFilter plugged in. Any objects send by this filter will be wrapped in a DynamicClassLoaderMessage object which includes the NetChannelLocation of a channel for the local node's JFTP service.

Instances of this class will be created by the DynamicClassLoader service and should be obtained via its getTxFilter method.

  • Field Details

    • senderLoc

      private NetChannelLocation senderLoc
      Location of the JFTP service's request channel.
  • Constructor Details

    • DataSerializationFilter

      public DataSerializationFilter(NetChannelLocation senderLoc)
      Constructs a new DataSerializationFilter object.
      Parameters:
      senderLoc - the location of the JFTP service's request channel.
  • Method Details

    • filter

      public Object filter(Object obj)
      Wraps the object in a DynamicClassLoaderMessage complete with the JFTP channel location passed to the filter's constructor.
      Specified by:
      filter in interface Filter
      Parameters:
      obj - the object to wrap up
      Returns:
      the wrapped object