Class ModuleClassLoaderMarshaller

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

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

    • ModuleClassLoaderMarshaller

      public ModuleClassLoaderMarshaller(org.jboss.modules.Module defaultModule)
    • ModuleClassLoaderMarshaller

      public ModuleClassLoaderMarshaller(org.jboss.modules.ModuleLoader 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 loader) 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
      loader - the object to be written
      Throws:
      IOException - if the object could not be written