Class MarshalledValueMarshaller<V,C>

java.lang.Object
org.wildfly.clustering.marshalling.MarshalledValueMarshaller<V,C>
Type Parameters:
V - the marshalled value type
C - the marshalling context type
All Implemented Interfaces:
Predicate<Object>, Predicate<Object>, Marshaller<V, MarshalledValue<V,C>>

public class MarshalledValueMarshaller<V,C> extends Object implements Marshaller<V, MarshalledValue<V,C>>
Marshaller that stores attribute values using marshalled values.
Author:
Paul Ferraro
  • Constructor Details

    • MarshalledValueMarshaller

      public MarshalledValueMarshaller(MarshalledValueFactory<C> factory)
      Constructs a new marshaller using the specified marshalled value factory.
      Parameters:
      factory - a marshalled value factory
  • Method Details

    • read

      public V read(MarshalledValue<V,C> value) throws IOException
      Description copied from interface: Marshaller
      Reads a value from its marshalled form.
      Specified by:
      read in interface Marshaller<V,C>
      Parameters:
      value - the marshalled form
      Returns:
      an unmarshalled value
      Throws:
      IOException - if the value could not be read
    • write

      public MarshalledValue<V,C> write(V object)
      Description copied from interface: Marshaller
      Writes a value to its serialized form
      Specified by:
      write in interface Marshaller<V,C>
      Parameters:
      object - a value to marshal.
      Returns:
      the serialized form of the value
    • test

      public boolean test(Object object)
      Specified by:
      test in interface Predicate<V>