|
JBoss Marshalling 1.3.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.marshalling.ModularClassResolver
public final class ModularClassResolver
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 be used when the marshalling and unmarshalling side may have differing class files.
Method Summary | |
---|---|
void |
annotateClass(Marshaller marshaller,
java.lang.Class<?> clazz)
Add optional information about a class to a stream. |
void |
annotateProxyClass(Marshaller marshaller,
java.lang.Class<?> proxyClass)
Add optional information about a proxy class to a stream. |
java.lang.String |
getClassName(java.lang.Class<?> clazz)
Get the class name to write for a given class. |
static ModularClassResolver |
getInstance(org.jboss.modules.ModuleLoader moduleLoader)
Construct a new instance using the given module loader. |
java.lang.String[] |
getProxyInterfaces(java.lang.Class<?> proxyClass)
Get the interface names to write for a given proxy class. |
java.lang.Class<?> |
resolveClass(Unmarshaller unmarshaller,
java.lang.String className,
long serialVersionUID)
Load the local class for a class descriptor. |
java.lang.Class<?> |
resolveProxyClass(Unmarshaller unmarshaller,
java.lang.String[] names)
Load a proxy class that implements the given interfaces. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ModularClassResolver getInstance(org.jboss.modules.ModuleLoader moduleLoader)
moduleLoader
- the module loader
public void annotateClass(Marshaller marshaller, java.lang.Class<?> clazz) throws java.io.IOException
annotateClass
in interface ClassResolver
marshaller
- the marshaller to write toclazz
- the class that was written
java.io.IOException
- if an error occursObjectOutputStream.annotateClass(Class)
public void annotateProxyClass(Marshaller marshaller, java.lang.Class<?> proxyClass) throws java.io.IOException
annotateProxyClass
in interface ClassResolver
marshaller
- the marshaller to write toproxyClass
- the class that was written
java.io.IOException
- if an error occursObjectOutputStream.annotateProxyClass(Class)
public java.lang.String getClassName(java.lang.Class<?> clazz) throws java.io.IOException
getClassName
in interface ClassResolver
clazz
- the class
java.io.IOException
- if an error occurspublic java.lang.String[] getProxyInterfaces(java.lang.Class<?> proxyClass) throws java.io.IOException
getProxyInterfaces
in interface ClassResolver
proxyClass
- the proxy class
java.io.IOException
- if an error occurspublic java.lang.Class<?> resolveClass(Unmarshaller unmarshaller, java.lang.String className, long serialVersionUID) throws java.io.IOException, java.lang.ClassNotFoundException
ClassResolver.annotateClass(Marshaller, Class)
should be read by this method.
resolveClass
in interface ClassResolver
unmarshaller
- the unmarshaller from which to read annotation data, if anyclassName
- the class nameserialVersionUID
- the serial version UID
java.io.IOException
- if an I/O error occurs
java.lang.ClassNotFoundException
- if the class could not be loadedObjectInputStream.resolveClass(java.io.ObjectStreamClass)
public java.lang.Class<?> resolveProxyClass(Unmarshaller unmarshaller, java.lang.String[] names) throws java.io.IOException, java.lang.ClassNotFoundException
resolveProxyClass
in interface ClassResolver
unmarshaller
- the unmarshaller from which to read annotation data, if anynames
- the class descriptor
java.io.IOException
- if an I/O error occurs
java.lang.ClassNotFoundException
- if the proxy class could not be loadedObjectInputStream.resolveProxyClass(String[])
|
JBoss Marshalling 1.3.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |