org.openejb.core.ivm
Class IntraVmHandle
java.lang.Object
|
+--org.openejb.core.ivm.IntraVmHandle
- All Implemented Interfaces:
- javax.ejb.Handle, javax.ejb.HomeHandle, java.io.Serializable
- public class IntraVmHandle
- extends java.lang.Object
- implements java.io.Serializable, javax.ejb.HomeHandle, javax.ejb.Handle
IntraVM implementation of the interface javax.ejb.Handle
- See Also:
- Serialized Form
Field Summary |
java.lang.Object |
theProxy
The Proxy subclass that represents the bean
deployment's EJBHome or EJBObject. |
Constructor Summary |
IntraVmHandle()
Constructs an IntraVmHandle that has no refernce to
an EJBHome or EJBObject. |
IntraVmHandle(java.lang.Object proxy)
Constructs an IntraVmHandle that has a refernce to
the specified EJBHome or EJBObject stub/proxy. |
Method Summary |
javax.ejb.EJBHome |
getEJBHome()
Returns the stub/proxy referenced by this handle as an EJBHome. |
javax.ejb.EJBObject |
getEJBObject()
Returns the stub/proxy referenced by this handle as an EJBObject. |
protected void |
setProxy(java.lang.Object prxy)
Sets the EJBHome or EJBObject stub/proxy that this
handle is a reference to. |
protected java.lang.Object |
writeReplace()
If the handle is being copied between bean instances in a RPC
call we use the IntraVmArtifact
If the handle is referenced by a stateful bean that is being
passivated by the container, we allow this object to be serialized. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
theProxy
public java.lang.Object theProxy
- The Proxy subclass that represents the bean
deployment's EJBHome or EJBObject.
- See Also:
Proxy
IntraVmHandle
public IntraVmHandle()
- Constructs an IntraVmHandle that has no refernce to
an EJBHome or EJBObject.
IntraVmHandle
public IntraVmHandle(java.lang.Object proxy)
- Constructs an IntraVmHandle that has a refernce to
the specified EJBHome or EJBObject stub/proxy.
- Parameters:
proxy
-
setProxy
protected void setProxy(java.lang.Object prxy)
- Sets the EJBHome or EJBObject stub/proxy that this
handle is a reference to.
- Parameters:
prxy
- The proxy object that this handle will reference.
getEJBHome
public javax.ejb.EJBHome getEJBHome()
- Returns the stub/proxy referenced by this handle as an EJBHome.
- Specified by:
getEJBHome
in interface javax.ejb.HomeHandle
- Returns:
- the proxy object this handle is a reference to.
getEJBObject
public javax.ejb.EJBObject getEJBObject()
- Returns the stub/proxy referenced by this handle as an EJBObject.
- Specified by:
getEJBObject
in interface javax.ejb.Handle
- Returns:
- the proxy object this handle is a reference to.
writeReplace
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException
- If the handle is being copied between bean instances in a RPC
call we use the IntraVmArtifact
If the handle is referenced by a stateful bean that is being
passivated by the container, we allow this object to be serialized.
If the handle is serialized outside the core container system, we
allow the application server to handle it.
- Returns:
-
- Throws:
java.io.ObjectStreamException
-