Class ModularClassTable
java.lang.Object
org.jboss.marshalling.ModularClassTable
- All Implemented Interfaces:
ClassTable
A class table which implements an alternate class resolution strategy based on JBoss Modules.
Each class name is stored along with its corresponding module identifier, which allows the object graph
to be exactly reconstituted on the remote side. This class should only be used when the marshalling
and unmarshalling side share the same class files.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static final classNested classes/interfaces inherited from interface ClassTable
ClassTable.Writer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ClassTable.Writerprivate final org.jboss.modules.ModuleLoaderprivate static final ClassTable.Writer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateModularClassTable(org.jboss.modules.ModuleLoader moduleLoader) -
Method Summary
Modifier and TypeMethodDescriptiongetClassWriter(Class<?> clazz) Determine whether the given class reference is a valid predefined reference.static ModularClassTablegetInstance(org.jboss.modules.ModuleLoader moduleLoader) Get an instance using the given module loader.Class<?> readClass(Unmarshaller unmarshaller) Read a class from the stream.
-
Field Details
-
PROXY_WRITER
-
CLASS_WRITER
-
moduleLoader
private final org.jboss.modules.ModuleLoader moduleLoader
-
-
Constructor Details
-
ModularClassTable
private ModularClassTable(org.jboss.modules.ModuleLoader moduleLoader)
-
-
Method Details
-
getInstance
Get an instance using the given module loader.- Parameters:
moduleLoader- the module loader to use- Returns:
- the modular class table
-
getClassWriter
Determine whether the given class reference is a valid predefined reference.- Specified by:
getClassWriterin interfaceClassTable- Parameters:
clazz- the candidate class- Returns:
- the class writer, or
nullto use the default mechanism - Throws:
IOException- if an I/O error occurs
-
readClass
Read a class from the stream. The class will have been written by theClassTable.getClassWriter(Class)method'sWriterinstance, as defined above.- Specified by:
readClassin interfaceClassTable- Parameters:
unmarshaller- the unmarshaller to read from- Returns:
- the class
- Throws:
IOException- if an I/O error occursClassNotFoundException- if a class could not be found
-