org.apache.openejb.client
Class EJBInvocationHandler

java.lang.Object
  extended by org.apache.openejb.client.EJBInvocationHandler
All Implemented Interfaces:
Serializable, InvocationHandler
Direct Known Subclasses:
EJBHomeHandler, EJBObjectHandler

public abstract class EJBInvocationHandler
extends Object
implements InvocationHandler, Serializable

See Also:
Serialized Form

Field Summary
protected  ClientMetaData client
           
protected  EJBMetaDataImpl ejb
           
protected static Method EQUALS
           
protected static Method HASHCODE
           
protected  boolean inProxyMap
           
protected  boolean isInvalidReference
           
protected static ConcurrentMap<Object,Set<WeakReference<EJBInvocationHandler>>> liveHandleRegistry
           
protected  Object primaryKey
           
protected  boolean remote
           
protected  EJBRequest request
           
protected  ServerMetaData server
           
protected static Method TOSTRING
           
 
Constructor Summary
EJBInvocationHandler()
           
EJBInvocationHandler(EJBMetaDataImpl ejb, ServerMetaData server, ClientMetaData client)
           
EJBInvocationHandler(EJBMetaDataImpl ejb, ServerMetaData server, ClientMetaData client, Object primaryKey)
           
 
Method Summary
protected abstract  Object _invoke(Object proxy, Method method, Object[] args)
           
protected  Throwable convertException(Throwable e, Method method)
          Renamed method so it shows up with a much more understandable purpose as it will be the top element in the stacktrace
protected  Throwable getCause(Throwable e)
           
 ClientMetaData getClient()
           
protected  Object getClientIdentity()
           
 EJBMetaDataImpl getEjb()
           
protected static Method getMethod(Class c, String method, Class... params)
           
 Object getPrimaryKey()
           
 ServerMetaData getServer()
           
protected static void invalidateAllHandlers(Object key)
           
protected  void invalidateReference()
           
 Object invoke(Object proxy, Method method, Object[] args)
           
protected static void registerHandler(Object key, EJBInvocationHandler handler)
           
protected  EJBResponse request(EJBRequest req)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EQUALS

protected static final Method EQUALS

HASHCODE

protected static final Method HASHCODE

TOSTRING

protected static final Method TOSTRING

liveHandleRegistry

protected static final ConcurrentMap<Object,Set<WeakReference<EJBInvocationHandler>>> liveHandleRegistry

inProxyMap

protected transient boolean inProxyMap

isInvalidReference

protected transient boolean isInvalidReference

request

protected transient EJBRequest request

ejb

protected transient EJBMetaDataImpl ejb

server

protected transient ServerMetaData server

client

protected transient ClientMetaData client

primaryKey

protected transient Object primaryKey

remote

protected final boolean remote
Constructor Detail

EJBInvocationHandler

public EJBInvocationHandler()

EJBInvocationHandler

public EJBInvocationHandler(EJBMetaDataImpl ejb,
                            ServerMetaData server,
                            ClientMetaData client)

EJBInvocationHandler

public EJBInvocationHandler(EJBMetaDataImpl ejb,
                            ServerMetaData server,
                            ClientMetaData client,
                            Object primaryKey)
Method Detail

getEjb

public EJBMetaDataImpl getEjb()

getServer

public ServerMetaData getServer()

getClient

public ClientMetaData getClient()

getPrimaryKey

public Object getPrimaryKey()

getMethod

protected static Method getMethod(Class c,
                                  String method,
                                  Class... params)

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

_invoke

protected abstract Object _invoke(Object proxy,
                                  Method method,
                                  Object[] args)
                           throws Throwable
Throws:
Throwable

request

protected EJBResponse request(EJBRequest req)
                       throws Exception
Throws:
Exception

getClientIdentity

protected Object getClientIdentity()

invalidateReference

protected void invalidateReference()

invalidateAllHandlers

protected static void invalidateAllHandlers(Object key)

registerHandler

protected static void registerHandler(Object key,
                                      EJBInvocationHandler handler)

convertException

protected Throwable convertException(Throwable e,
                                     Method method)
Renamed method so it shows up with a much more understandable purpose as it will be the top element in the stacktrace

Parameters:
e -
method -

getCause

protected Throwable getCause(Throwable e)


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.