Class SimpleClassLoaderMarshaller

java.lang.Object
org.wildfly.clustering.marshalling.protostream.SimpleClassLoaderMarshaller
All Implemented Interfaces:
ClassLoaderMarshaller, FieldReadable<ClassLoader>, FieldSetMarshaller<ClassLoader,ClassLoader>, FieldSetMarshaller.Simple<ClassLoader>, Writable<ClassLoader>

public class SimpleClassLoaderMarshaller extends Object implements ClassLoaderMarshaller
Author:
Paul Ferraro
  • Constructor Details

    • SimpleClassLoaderMarshaller

      public SimpleClassLoaderMarshaller(ClassLoader loader)
  • Method Details

    • createInitialValue

      public ClassLoader createInitialValue()
      Description copied from interface: FieldSetMarshaller
      Returns a builder for use with #readField(ProtoStreamReader, Object). May return a shared instance, if the builder type is immutable, or a new instance, if the builder is mutable.
      Specified by:
      createInitialValue in interface FieldSetMarshaller<ClassLoader,ClassLoader>
      Returns:
      a builder.
    • getFields

      public int getFields()
      Description copied from interface: FieldReadable
      Returns the number of fields in this field set
      Specified by:
      getFields in interface FieldReadable<ClassLoader>
      Returns:
      a number of fields
    • readFrom

      public ClassLoader readFrom(ProtoStreamReader reader, int index, org.infinispan.protostream.descriptors.WireType type, ClassLoader loader) throws IOException
      Description copied from interface: FieldReadable
      Reads a single field from the specified reader.
      Specified by:
      readFrom in interface FieldReadable<ClassLoader>
      Parameters:
      reader - a reader
      index - the zero-based index, relative to this field set, of the field to be read
      type - the wire type of the field to be read
      loader - the current value
      Returns:
      the read value
      Throws:
      IOException - if a field could not be read
    • writeTo

      public void writeTo(ProtoStreamWriter writer, ClassLoader value) throws IOException
      Description copied from interface: Writable
      Writes the specified object to the specified writer.
      Specified by:
      writeTo in interface Writable<ClassLoader>
      Parameters:
      writer - a ProtoStream writer
      value - the object to be written
      Throws:
      IOException - if the object could not be written