|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.rpc.AbsInvocationHandler
org.objectweb.easybeans.rpc.ClientRPCInvocationHandler
org.objectweb.easybeans.rpc.EJBHomeRPCInvocationHandler
public class EJBHomeRPCInvocationHandler
This class sends an EJB request to the server and send back to the client the response. It handles the EJBHome calls.
Field Summary | |
---|---|
private java.lang.String |
remoteInterface
Remote interface. |
private static long |
serialVersionUID
Id for serializable class. |
Constructor Summary | |
---|---|
EJBHomeRPCInvocationHandler(java.lang.String containerId,
java.lang.String factoryName,
boolean useID,
java.lang.String remoteInterface)
Build a new Invocation handler. |
Method Summary | |
---|---|
private EJBMetaData |
handleGetEJBMetadata(java.lang.Object proxy)
Build a metadata object. |
private HomeHandle |
handleGetHomeHandle()
Gets an Home handle from this EJB Home. |
private void |
handleRemoveMethod(java.lang.Object[] args)
Handle the remove method for this EJB Home object. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Processes a method invocation on a proxy instance and returns the result. |
Methods inherited from class org.objectweb.easybeans.rpc.ClientRPCInvocationHandler |
---|
convertThrowable, getRMIEnv, setRMIEnv |
Methods inherited from class org.objectweb.easybeans.rpc.AbsInvocationHandler |
---|
getBeanId, getContainerId, getFactoryName, getHashedMethods, getInterfaceClassName, handleObjectMethods, handleThrowable, isExtendingRmiRemote, isRemoved, isUsingID, setBeanId, setContainerId, setExtendingRmiRemote, setFactoryName, setHashedMethods, setInterfaceClass, setInterfaceClassName, setRemoved, setUseID, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private java.lang.String remoteInterface
Constructor Detail |
---|
public EJBHomeRPCInvocationHandler(java.lang.String containerId, java.lang.String factoryName, boolean useID, java.lang.String remoteInterface)
containerId
- the id of the container that will be called on the
remote side.factoryName
- the name of the remote factory.useID
- true if all instance build with this ref are unique
(stateful), false if it references the same object (stateless)remoteInterface
- the name of the remote interface used by the home interface.Method Detail |
---|
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Exception
invoke
in interface java.lang.reflect.InvocationHandler
invoke
in class ClientRPCInvocationHandler
proxy
- the proxy instance that the method was invoked onmethod
- the Method
instance corresponding to the
interface method invoked on the proxy instance. The declaring
class of the Method
object will be the interface
that the method was declared in, which may be a superinterface of
the proxy interface that the proxy class inherits the method
through.args
- an array of objects containing the values of the arguments
passed in the method invocation on the proxy instance, or
null
if interface method takes no arguments.
Arguments of primitive types are wrapped in instances of the
appropriate primitive wrapper class, such as
java.lang.Integer
or java.lang.Boolean
.
java.lang.Exception
- the exception to throw from the method invocation on
the proxy instance.private void handleRemoveMethod(java.lang.Object[] args) throws java.rmi.RemoteException, RemoveException
args
- the arguments of the remove method. For primary key, it will
throw an error.
RemoveException
- when applying remove method on a primary key.
java.rmi.RemoteException
- if the ejbObject cannot be retrieved from the
handle or if the remove method is failing.private EJBMetaData handleGetEJBMetadata(java.lang.Object proxy) throws java.rmi.RemoteException
proxy
- the object on which the method is currently invoked (it's the home proxy).
java.rmi.RemoteException
- if metadata object cannot be built.private HomeHandle handleGetHomeHandle()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |