Class JavaByteBufferMarshaller

java.lang.Object
org.wildfly.clustering.marshalling.AbstractByteBufferMarshaller
org.wildfly.clustering.marshalling.java.JavaByteBufferMarshaller
All Implemented Interfaces:
Predicate<Object>, Predicate<Object>, ByteBufferMarshaller, Marshaller<Object, ByteBuffer>

public class JavaByteBufferMarshaller extends AbstractByteBufferMarshaller
A ByteBufferMarshaller based on Java serialization.
Author:
Paul Ferraro
  • Constructor Details

    • JavaByteBufferMarshaller

      public JavaByteBufferMarshaller(ClassLoader loader, ObjectInputFilter filter)
      Creates a new marshaller using the specified class loader and filter.
      Parameters:
      loader - a class loader
      filter - a filter use secure serialization
    • JavaByteBufferMarshaller

      public JavaByteBufferMarshaller(Serializer<ClassLoader> classLoaderSerializer, ClassLoader loader, ObjectInputFilter filter)
      Creates a new marshaller using the specified class loader and filter.
      Parameters:
      classLoaderSerializer - a class loader serializer
      loader - a class loader
      filter - a filter use secure serialization
  • Method Details

    • test

      public boolean test(Object object)
    • readFrom

      public Object readFrom(InputStream in) throws IOException
      Description copied from interface: ByteBufferMarshaller
      Reads an object from the specified input stream.
      Parameters:
      in - an input stream
      Returns:
      the unmarshalled object
      Throws:
      IOException - if the object could not be read
    • writeTo

      public void writeTo(OutputStream out, Object object) throws IOException
      Description copied from interface: ByteBufferMarshaller
      Writes the specified object to the specified output stream.
      Parameters:
      out - an output stream
      object - an object to marshal
      Throws:
      IOException - if the object could not be written
    • toString

      public String toString()
      Overrides:
      toString in class Object