|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.rpc.ClientRPCInvocationHandler
public class ClientRPCInvocationHandler
This class sends an EJB request to the server and send back to the client the response.
Field Summary | |
---|---|
private java.lang.Long |
beanId
Bean id. |
private java.lang.String |
containerId
Container id. |
private java.lang.String |
factoryName
Factory name. |
private java.util.Map<java.lang.reflect.Method,java.lang.Long> |
hashedMethods
Map between method and its hash. |
private static long |
serialVersionUID
Id for serializable class. |
Constructor Summary | |
---|---|
ClientRPCInvocationHandler(java.lang.String containerId,
java.lang.String factoryName)
Build a new Invocation handler. |
Method Summary | |
---|---|
private java.lang.Object |
handleObjectMethods(java.lang.reflect.Method method,
java.lang.Object[] args)
Manages all methods of java.lang.Object class. |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private java.lang.String containerId
private java.lang.String factoryName
private java.lang.Long beanId
private java.util.Map<java.lang.reflect.Method,java.lang.Long> hashedMethods
Constructor Detail |
---|
public ClientRPCInvocationHandler(java.lang.String containerId, java.lang.String factoryName)
containerId
- the id of the container that will be called on the remote side.factoryName
- the name of the remote factory.Method Detail |
---|
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.RuntimeException
invoke
in interface java.lang.reflect.InvocationHandler
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.RuntimeException
- the exception to throw from the method invocation on
the proxy instance.private java.lang.Object handleObjectMethods(java.lang.reflect.Method method, java.lang.Object[] args)
method
- 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |