|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openejb.client.EJBInvocationHandler
org.openejb.client.EJBHomeHandler
Handles invocations from an EJBHomeProxy.
Field Summary | |
protected static Method |
GETEJBMETADATA
|
protected static Method |
GETHANDLER
|
protected static Method |
GETHOMEHANDLE
|
protected static Method |
REMOVE_W_HAND
|
protected static Method |
REMOVE_W_KEY
|
Fields inherited from class org.openejb.client.EJBInvocationHandler |
client, ejb, EQUALS, HASHCODE, inProxyMap, isInvalidReference, liveHandleRegistry, primaryKey, request, server, TOSTRING |
Fields inherited from interface org.openejb.client.ResponseCodes |
AUTH_DENIED, AUTH_GRANTED, AUTH_REDIRECT, EJB_APP_EXCEPTION, EJB_ERROR, EJB_OK, EJB_OK_CREATE, EJB_OK_FOUND, EJB_OK_FOUND_COLLECTION, EJB_OK_FOUND_ENUMERATION, EJB_OK_NOT_FOUND, EJB_SYS_EXCEPTION, JNDI_CONTEXT, JNDI_EJBHOME, JNDI_ENUMERATION, JNDI_ERROR, JNDI_NAMING_EXCEPTION, JNDI_NOT_FOUND, JNDI_OK, JNDI_RUNTIME_EXCEPTION |
Constructor Summary | |
EJBHomeHandler()
Constructs an EJBHomeHandler to handle invocations from an EJBHomeProxy. |
|
EJBHomeHandler(EJBMetaDataImpl ejb,
ServerMetaData server,
ClientMetaData client)
|
Method Summary | |
protected Object |
_invoke(Object proxy,
Method method,
Object[] args)
Overridden by subclasses and called by EJBInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) . |
protected Object |
create(Method method,
Object[] args,
Object proxy)
Creates a new EJBObject and returns it to the caller. |
static EJBHomeHandler |
createEJBHomeHandler(EJBMetaDataImpl ejb,
ServerMetaData server,
ClientMetaData client)
|
EJBHomeProxy |
createEJBHomeProxy()
|
protected abstract Object |
findX(Method method,
Object[] args,
Object proxy)
Locates and returns a new EJBObject or a collection of EJBObjects. |
protected Object |
getEJBMetaData(Method method,
Object[] args,
Object proxy)
Returns an EJBMetaData implementation that is valid inside this virtual machine. |
protected Object |
getHomeHandle(Method method,
Object[] args,
Object proxy)
Returns a HomeHandle implementation that is valid inside this virtual machine. |
void |
readExternal(ObjectInput in)
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
protected abstract Object |
removeByPrimaryKey(Method method,
Object[] args,
Object proxy)
Attempts to remove an EJBObject from the container system. |
protected abstract Object |
removeWithHandle(Method method,
Object[] args,
Object proxy)
Attempts to remove an EJBObject from the container system. |
void |
writeExternal(ObjectOutput out)
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
Methods inherited from class org.openejb.client.EJBInvocationHandler |
getMethod, invalidateAllHandlers, invalidateReference, invoke, print, println, registerHandler, request |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final Method GETEJBMETADATA
protected static final Method GETHOMEHANDLE
protected static final Method REMOVE_W_KEY
protected static final Method REMOVE_W_HAND
protected static final Method GETHANDLER
Constructor Detail |
public EJBHomeHandler()
public EJBHomeHandler(EJBMetaDataImpl ejb, ServerMetaData server, ClientMetaData client)
Method Detail |
public static EJBHomeHandler createEJBHomeHandler(EJBMetaDataImpl ejb, ServerMetaData server, ClientMetaData client)
public EJBHomeProxy createEJBHomeProxy()
protected Object _invoke(Object proxy, Method method, Object[] args) throws Throwable
EJBInvocationHandler
EJBInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
.
Subclasses implement the main behavior of calling invoke on the
Container that the bean deployment lives in.
_invoke
in class EJBInvocationHandler
proxy
- The Proxy subclass that is the bean's EJBObject or EJBHome.method
- The bean method that the caller is attempting to invoke.args
- The arguments to the method being invoked.
Throwable
protected Object create(Method method, Object[] args, Object proxy) throws Throwable
Creates a new EJBObject and returns it to the caller. The EJBObject is a new proxy with a new handler. This implementation should not be sent outside the virtual machine.
This method propogates to the container system.
The create method is required to be defined by the bean's home interface.
method
- args
- proxy
-
Throwable
protected abstract Object findX(Method method, Object[] args, Object proxy) throws Throwable
Locates and returns a new EJBObject or a collection of EJBObjects. The EJBObject(s) is a new proxy with a new handler. This implementation should not be sent outside the virtual machine.
This method propogates to the container system.
The find method is required to be defined by the bean's home interface of Entity beans.
method
- args
- proxy
-
Throwable
protected Object getEJBMetaData(Method method, Object[] args, Object proxy) throws Throwable
Returns an EJBMetaData implementation that is valid inside this virtual machine. This implementation should not be sent outside the virtual machine.
This method does not propogate to the container system.
getMetaData is a method of javax.ejb.EJBHome
Checks if the caller is authorized to invoke the javax.ejb.EJBHome.getMetaData on the EJBHome of the deployment.
Throwable
EJBHome
,
EJBHome.getEJBMetaData()
protected Object getHomeHandle(Method method, Object[] args, Object proxy) throws Throwable
Returns a HomeHandle implementation that is valid inside this virtual machine. This implementation should not be sent outside the virtual machine.
This method does not propogate to the container system.
getHomeHandle is a method of javax.ejb.EJBHome
Checks if the caller is authorized to invoke the javax.ejb.EJBHome.getHomeHandle on the EJBHome of the deployment.
proxy
-
Throwable
EJBHome
,
EJBHome.getHomeHandle()
protected abstract Object removeWithHandle(Method method, Object[] args, Object proxy) throws Throwable
Attempts to remove an EJBObject from the container system. The EJBObject to be removed is represented by the javax.ejb.Handle object passed into the remove method in the EJBHome.
This method propogates to the container system.
remove(Handle handle) is a method of javax.ejb.EJBHome
Checks if the caller is authorized to invoke the javax.ejb.EJBHome.remove on the EJBHome of the deployment.
method
- args
-
Throwable
EJBHome
,
EJBHome.remove(javax.ejb.Handle)
protected abstract Object removeByPrimaryKey(Method method, Object[] args, Object proxy) throws Throwable
Attempts to remove an EJBObject from the container system. The EJBObject to be removed is represented by the primaryKey passed into the remove method of the EJBHome.
This method propogates to the container system.
remove(Object primary) is a method of javax.ejb.EJBHome
Checks if the caller is authorized to invoke the javax.ejb.EJBHome.remove on the EJBHome of the deployment.
method
- args
-
Throwable
EJBHome
,
EJBHome.remove(javax.ejb.Handle)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
in
- the stream to read data from in order to restore the object
IOException
- if I/O errors occur
ClassNotFoundException
- If the class for an object being
restored cannot be found.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- the stream to write the object to
IOException
- Includes any I/O exceptions that may occur
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |