Interface Marshaller<V,S>

Type Parameters:
V - the value type
S - the marshalled type
All Superinterfaces:
Marshallability
All Known Subinterfaces:
ByteBufferMarshaller
All Known Implementing Classes:
MarshalledValueMarshaller

public interface Marshaller<V,S> extends Marshallability
Marshals an object to and from its serialized form.
Author:
Paul Ferraro
  • Field Summary

    Fields inherited from interface org.wildfly.clustering.marshalling.Marshallability

    TRUE
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Marshaller<T,T>
    An identity marshaller that does no marshalling.
    read(S value)
    Reads a value from its marshalled form.
    write(V value)
    Writes a value to its serialized form

    Methods inherited from interface org.wildfly.clustering.marshalling.Marshallability

    isMarshallable
  • Method Details

    • identity

      static <T> Marshaller<T,T> identity()
      An identity marshaller that does no marshalling.
      Type Parameters:
      T - the value type
      Returns:
      an identity marshaller
    • read

      V read(S value) throws IOException
      Reads a value from its marshalled form.
      Parameters:
      value - the marshalled form
      Returns:
      an unmarshalled value
      Throws:
      IOException
    • write

      S write(V value) throws IOException
      Writes a value to its serialized form
      Parameters:
      value - a value to marshal.
      Returns:
      the serialized form of the value
      Throws:
      IOException