org.openejb.core.ivm
Class IntraVmHandle

java.lang.Object
  extended by org.openejb.core.ivm.IntraVmHandle
All Implemented Interfaces:
java.io.Serializable, javax.ejb.Handle, javax.ejb.HomeHandle

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

Author:
David Blevins, Richard Monson-Haefel
See Also:
Serialized Form

Field Summary
protected  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.
 java.lang.Object getPrimaryKey()
           
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
 

Field Detail

theProxy

protected java.lang.Object theProxy
The Proxy subclass that represents the bean deployment's EJBHome or EJBObject.

See Also:
Proxy
Constructor Detail

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 -
Method Detail

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.

getPrimaryKey

public java.lang.Object getPrimaryKey()

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:
Object
Throws:
java.io.ObjectStreamException


Copyright © 1999-2011 OpenEJB. All Rights Reserved.