Invocation API 1.1.0.Final

org.jboss.invocation.proxy
Class DefaultSerializableProxy

java.lang.Object
  extended by 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 InvocationHandler state 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
DefaultSerializableProxy()
           
 
Method Summary
protected  Class<?> getProxyClass()
          Get the associated proxy class.
protected  ClassLoader getProxyClassLoader()
          Get the proxy class loader.
protected  Object readResolve()
          Resolve the serialized proxy to a real instance.
 void setProxyInstance(Object proxy)
          Set the proxy instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSerializableProxy

public DefaultSerializableProxy()
Method Detail

setProxyInstance

public void setProxyInstance(Object proxy)
Set the proxy instance.

Specified by:
setProxyInstance in interface SerializableProxy
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

Invocation API 1.1.0.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.