org.apache.webbeans.proxy
Class ResourceProxyHandler
java.lang.Object
org.apache.webbeans.proxy.ResourceProxyHandler
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, javassist.util.proxy.MethodHandler
public class ResourceProxyHandler
- extends java.lang.Object
- implements javassist.util.proxy.MethodHandler, java.io.Serializable, java.io.Externalizable
- See Also:
- Serialized Form
|
Method Summary |
java.lang.Object |
invoke(java.lang.Object self,
java.lang.reflect.Method actualMethod,
java.lang.reflect.Method proceed,
java.lang.Object[] args)
|
void |
readExternal(java.io.ObjectInput in)
When deserialized, first try container provided failover service. |
void |
writeExternal(java.io.ObjectOutput out)
When serialized, first try container provided failover service. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceProxyHandler
public ResourceProxyHandler()
ResourceProxyHandler
public ResourceProxyHandler(ResourceBean bean,
java.lang.Object actualResource)
invoke
public java.lang.Object invoke(java.lang.Object self,
java.lang.reflect.Method actualMethod,
java.lang.reflect.Method proceed,
java.lang.Object[] args)
throws java.lang.Throwable
- Specified by:
invoke in interface javassist.util.proxy.MethodHandler
- Throws:
java.lang.Throwable
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- When serialized, first try container provided failover service. If the failover service
does not handle the actual instance, the default behavior is:
1. If actual object is serializable, then serialize it directly.
2. If not, serialize the DUMMY_STRING.
- Specified by:
writeExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- When deserialized, first try container provided failover service. If the failover service does not
handle the actual instance, the default behavior is:
1. Read the object from the stream,
2. If the object is renote ejb stub, reconnect it.
3. if the object is DUMMY_STRING, invoke ResourceBean.getActualInstance to get a new instance of the resource.
- Specified by:
readExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.