Package org.jcsp.net2

Class ObjectNetworkMessageFilter.FilterTX

java.lang.Object
org.jcsp.net2.ObjectNetworkMessageFilter.FilterTX
All Implemented Interfaces:
NetworkMessageFilter.FilterTx
Enclosing class:
ObjectNetworkMessageFilter

public static final class ObjectNetworkMessageFilter.FilterTX extends Object implements NetworkMessageFilter.FilterTx
The sending (encoding) filter for Object channels
  • Field Details

  • Constructor Details

    • FilterTX

      public FilterTX()
      Creates a new encoding object filter
  • Method Details

    • filterTX

      public byte[] filterTX(Object obj) throws IOException
      Encodes an object into bytes by using Object serialization
      Specified by:
      filterTX in interface NetworkMessageFilter.FilterTx
      Parameters:
      obj - The Object to serialize
      Returns:
      The byte array equivalent of the object
      Throws:
      IOException - Thrown if something goes wrong during the serialization