org.apache.openejb.client
Class EJBInvocationHandler

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

public abstract class EJBInvocationHandler
extends java.lang.Object
implements InvocationHandler, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  ClientMetaData client
           
protected  EJBMetaDataImpl ejb
           
protected static java.lang.reflect.Method EQUALS
           
protected static java.lang.reflect.Method HASHCODE
           
protected  boolean inProxyMap
           
protected  java.util.concurrent.atomic.AtomicBoolean isInvalidReference
           
protected static java.util.concurrent.ConcurrentMap<java.lang.Object,java.util.Set<java.lang.ref.WeakReference<EJBInvocationHandler>>> liveHandleRegistry
           
protected  java.lang.Object primaryKey
           
protected  boolean remote
           
protected  EJBRequest request
           
protected  ServerMetaData server
           
protected static java.lang.reflect.Method TOSTRING
           
 
Constructor Summary
EJBInvocationHandler()
           
EJBInvocationHandler(EJBMetaDataImpl ejb, ServerMetaData server, ClientMetaData client)
           
EJBInvocationHandler(EJBMetaDataImpl ejb, ServerMetaData server, ClientMetaData client, java.lang.Object primaryKey)
           
 
Method Summary
protected abstract  java.lang.Object _invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
protected  java.lang.Throwable convertException(java.lang.Throwable e, java.lang.reflect.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 static java.lang.Throwable getCause(java.lang.Throwable e)
           
 ClientMetaData getClient()
           
protected  java.lang.Object getClientIdentity()
           
 EJBMetaDataImpl getEjb()
           
protected static java.lang.reflect.Method getMethod(java.lang.Class c, java.lang.String method, java.lang.Class... params)
           
 java.lang.Object getPrimaryKey()
           
 ServerMetaData getServer()
           
protected static void invalidateAllHandlers(java.lang.Object key)
           
protected  void invalidateReference()
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
protected static void registerHandler(java.lang.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 java.lang.reflect.Method EQUALS

HASHCODE

protected static final java.lang.reflect.Method HASHCODE

TOSTRING

protected static final java.lang.reflect.Method TOSTRING

liveHandleRegistry

protected static final java.util.concurrent.ConcurrentMap<java.lang.Object,java.util.Set<java.lang.ref.WeakReference<EJBInvocationHandler>>> liveHandleRegistry

inProxyMap

protected transient boolean inProxyMap

isInvalidReference

protected transient java.util.concurrent.atomic.AtomicBoolean isInvalidReference

request

protected transient EJBRequest request

ejb

protected transient EJBMetaDataImpl ejb

server

protected transient ServerMetaData server

client

protected transient ClientMetaData client

primaryKey

protected transient java.lang.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,
                            java.lang.Object primaryKey)
Method Detail

getEjb

public EJBMetaDataImpl getEjb()

getServer

public ServerMetaData getServer()

getClient

public ClientMetaData getClient()

getPrimaryKey

public java.lang.Object getPrimaryKey()

getMethod

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

invoke

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

_invoke

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

request

protected EJBResponse request(EJBRequest req)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getClientIdentity

protected java.lang.Object getClientIdentity()

invalidateReference

protected void invalidateReference()

invalidateAllHandlers

protected static void invalidateAllHandlers(java.lang.Object key)

registerHandler

protected static void registerHandler(java.lang.Object key,
                                      EJBInvocationHandler handler)

convertException

protected java.lang.Throwable convertException(java.lang.Throwable e,
                                               java.lang.reflect.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 static java.lang.Throwable getCause(java.lang.Throwable e)


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