|
||||||||||
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
public abstract class EJBHomeHandler
Handles invocations from an EJBHomeProxy.
Field Summary | |
---|---|
protected static java.lang.reflect.Method |
GETEJBMETADATA
|
protected static java.lang.reflect.Method |
GETHANDLER
|
protected static java.lang.reflect.Method |
GETHOMEHANDLE
|
protected static java.lang.reflect.Method |
REMOVE_W_HAND
|
protected static java.lang.reflect.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 java.lang.Object |
_invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Overridden by subclasses and called by EJBInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) . |
protected java.lang.Object |
create(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.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 java.lang.Object |
findX(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
Locates and returns a new EJBObject or a collection of EJBObjects. |
protected java.lang.Object |
getEJBMetaData(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
Returns an EJBMetaData implementation that is valid inside this virtual machine. |
protected java.lang.Object |
getHomeHandle(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
Returns a HomeHandle implementation that is valid inside this virtual machine. |
void |
readExternal(java.io.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 java.lang.Object |
removeByPrimaryKey(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
Attempts to remove an EJBObject from the container system. |
protected abstract java.lang.Object |
removeWithHandle(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
Attempts to remove an EJBObject from the container system. |
void |
writeExternal(java.io.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 java.lang.reflect.Method GETEJBMETADATA
protected static final java.lang.reflect.Method GETHOMEHANDLE
protected static final java.lang.reflect.Method REMOVE_W_KEY
protected static final java.lang.reflect.Method REMOVE_W_HAND
protected static final java.lang.reflect.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 java.lang.Object _invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.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.
java.lang.Throwable
protected java.lang.Object create(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy) throws java.lang.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
-
java.lang.Throwable
protected abstract java.lang.Object findX(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy) throws java.lang.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
-
java.lang.Throwable
protected java.lang.Object getEJBMetaData(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy) throws java.lang.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.
java.lang.Throwable
EJBHome
,
EJBHome.getEJBMetaData()
protected java.lang.Object getHomeHandle(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy) throws java.lang.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
-
java.lang.Throwable
EJBHome
,
EJBHome.getHomeHandle()
protected abstract java.lang.Object removeWithHandle(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy) throws java.lang.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
-
java.lang.Throwable
EJBHome
,
EJBHome.remove(javax.ejb.Handle)
protected abstract java.lang.Object removeByPrimaryKey(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy) throws java.lang.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
-
java.lang.Throwable
EJBHome
,
EJBHome.remove(javax.ejb.Handle)
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- the stream to read data from in order to restore the object
java.io.IOException
- if I/O errors occur
java.lang.ClassNotFoundException
- If the class for an object being
restored cannot be found.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- the stream to write the object to
java.io.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 |