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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.wildfly.clustering.marshalling.protostream.FieldSetMarshaller
FieldSetMarshaller.Simple<T>, FieldSetMarshaller.Supplied<T,V extends Supplier<T>>
-
-
Constructor Summary
Constructors Constructor Description ModuleClassLoaderMarshaller(org.jboss.modules.Module defaultModule)ModuleClassLoaderMarshaller(org.jboss.modules.ModuleLoader loader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoadercreateInitialValue()Returns a builder for use with#readField(ProtoStreamReader, Object).intgetFields()Returns the number of fields in this field setClassLoaderreadFrom(ProtoStreamReader reader, int index, org.infinispan.protostream.descriptors.WireType type, ClassLoader loader)Reads a single field from the specified reader.voidwriteTo(ProtoStreamWriter writer, ClassLoader loader)Writes the specified object to the specified writer.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.clustering.marshalling.protostream.FieldReadable
nextIndex
-
Methods inherited from interface org.wildfly.clustering.marshalling.protostream.FieldSetMarshaller.Simple
build
-
-
-
-
Method Detail
-
createInitialValue
public ClassLoader createInitialValue()
Description copied from interface:FieldSetMarshallerReturns 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:
createInitialValuein interfaceFieldSetMarshaller<ClassLoader,ClassLoader>- Returns:
- a builder.
-
getFields
public int getFields()
Description copied from interface:FieldReadableReturns the number of fields in this field set- Specified by:
getFieldsin interfaceFieldReadable<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:FieldReadableReads a single field from the specified reader.- Specified by:
readFromin interfaceFieldReadable<ClassLoader>- Parameters:
reader- a readerindex- the zero-based index, relative to this field set, of the field to be readtype- the wire type of the field to be readloader- 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:WritableWrites the specified object to the specified writer.- Specified by:
writeToin interfaceWritable<ClassLoader>- Parameters:
writer- a ProtoStream writerloader- the object to be written- Throws:
IOException- if the object could not be written
-
-