Class JavaByteBufferMarshaller

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

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

  • Method Details

    • isMarshallable

      public boolean isMarshallable(Object object)
      Description copied from interface: Marshallability
      Indicates whether the specified object can be marshalled.
      Parameters:
      object - an object to be marshalled
      Returns:
      true, if the specified object can be marshalled, false otherwise
    • 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