Package org.jboss.invocation.proxy
Class DefaultSerializableProxy
- java.lang.Object
-
- org.jboss.invocation.proxy.DefaultSerializableProxy
-
- All Implemented Interfaces:
Serializable,SerializableProxy
public class DefaultSerializableProxy extends Object implements SerializableProxy
Serialized representation of a proxy.Provides a simple default serialized representation, that saves the
InvocationHandlerstate and loads the proxy into the Thread Context Class Loader.This class should not be used if a security manager is present that prevents access to the Thread Context Class Loader.
- Author:
- Stuart Douglas
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultSerializableProxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class<?>getProxyClass()Get the associated proxy class.protected ClassLoadergetProxyClassLoader()Get the proxy class loader.protected ObjectreadResolve()Resolve the serialized proxy to a real instance.voidsetProxyInstance(Object proxy)Set the proxy instance.
-
-
-
Method Detail
-
setProxyInstance
public void setProxyInstance(Object proxy)
Set the proxy instance.- Specified by:
setProxyInstancein interfaceSerializableProxy- Parameters:
proxy- the proxy instance
-
readResolve
protected Object readResolve() throws ObjectStreamException
Resolve the serialized proxy to a real instance.- Returns:
- the resolved instance
- Throws:
ObjectStreamException- if an error occurs
-
getProxyClass
protected Class<?> getProxyClass() throws ClassNotFoundException
Get the associated proxy class.- Returns:
- the proxy class
- Throws:
ClassNotFoundException- if the proxy class is not found
-
getProxyClassLoader
protected ClassLoader getProxyClassLoader()
Get the proxy class loader.- Returns:
- the proxy class loader
-
-