org.jfox.ejb
Class DelegateInvocationHandler

java.lang.Object
  extended byorg.jfox.ejb.DelegateInvocationHandler
All Implemented Interfaces:
ClientInvocationHandler, java.lang.reflect.InvocationHandler, java.io.Serializable

public class DelegateInvocationHandler
extends java.lang.Object
implements ClientInvocationHandler

DelegateInvocationHandler 是一个与协议无关的InvocationHandler,最初和 EJBHome 绑定到 jndi 上, 在 ejbHome.create 的时候,将调用 setProtocolInvocationHandler 设置一个具体协议的 InvocationHandler

See Also:
Serialized Form

Constructor Summary
DelegateInvocationHandler(ObjectId objectId)
           
 
Method Summary
 ObjectId getObjectId()
          得到要访问的远程 EJBHome 或者 EJBObject 的 ObjectId
 ClientInvocationHandler getProtocolInvocationHandler()
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          可以实现通用的 Object 方法,比如:toString, hashCode 等
 void setProtocolInvocationHandler(ClientInvocationHandler protocolInvocationHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateInvocationHandler

public DelegateInvocationHandler(ObjectId objectId)
Method Detail

getObjectId

public ObjectId getObjectId()
Description copied from interface: ClientInvocationHandler
得到要访问的远程 EJBHome 或者 EJBObject 的 ObjectId

Specified by:
getObjectId in interface ClientInvocationHandler
Returns:

getProtocolInvocationHandler

public ClientInvocationHandler getProtocolInvocationHandler()

setProtocolInvocationHandler

public void setProtocolInvocationHandler(ClientInvocationHandler protocolInvocationHandler)

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
可以实现通用的 Object 方法,比如:toString, hashCode 等

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Parameters:
proxy -
method -
args -
Returns:
Throws:
java.lang.Throwable
See Also:
UndeclaredThrowableException