org.jboss.ejb3.proxy.impl.handler.session
Class SessionProxyInvocationHandlerBase

java.lang.Object
  extended by org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase
All Implemented Interfaces:
java.io.Serializable, java.lang.reflect.InvocationHandler, SessionProxyInvocationHandler
Direct Known Subclasses:
SessionLocalProxyInvocationHandler, SessionRemoteProxyInvocationHandler

public abstract class SessionProxyInvocationHandlerBase
extends java.lang.Object
implements SessionProxyInvocationHandler, java.io.Serializable

SessionProxyInvocationHandlerBase Abstract base from which all JBoss Session Proxy InvocationHandlers may extend

See Also:
Serialized Form

Constructor Summary
protected SessionProxyInvocationHandlerBase(java.lang.String containerName, java.lang.String containerGuid, org.jboss.aop.advice.Interceptor[] interceptors, java.lang.String businessInterfaceType, java.lang.Object target)
          Constructor
 
Method Summary
protected  org.jboss.ejb3.proxy.spi.container.InvokableContext createRemoteProxyToContainer(java.lang.String url)
          Creates and returns a Remoting Proxy to invoke upon the container This implementation is marked as FIXME as remoting should be an add-on capability atop ejb3-proxy
 java.lang.String getBusinessInterfaceType()
           
protected abstract  org.jboss.ejb3.proxy.spi.container.InvokableContext getContainer()
          Obtains the Container upon which this Proxy should invoke
 java.lang.String getContainerGuid()
           
protected  org.jboss.ejb3.proxy.spi.container.InvokableContext getContainerLocally()
          Returns the container housed locally
 java.lang.String getContainerName()
           
 org.jboss.aop.advice.Interceptor[] getInterceptors()
           
 java.lang.Object getTarget()
           
protected  java.lang.Object handleInvocationDirectly(java.lang.Object proxy, java.lang.Object[] args, java.lang.reflect.Method invokedMethod)
          Handles the current invocation directly in this invocation handler.
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          Required "invoke" as defined by InvocationHandler interface
 java.lang.Object invoke(java.lang.Object proxy, org.jboss.ejb3.common.lang.SerializableMethod method, java.lang.Object[] args)
          Overloaded "invoke" which takes into account a SerializableMethod view
protected  boolean invokeEquals(java.lang.Object proxy, java.lang.Object argument)
          Handles invocation of "equals(Object)" upon a Session Proxy EJB 3.0 Specification 3.4.5.1, 3.4.5.2
protected  int invokeHashCode(java.lang.Object proxy)
          Handles invocation of "hashCode()" upon the proxy
 void setBusinessInterfaceType(java.lang.String businessInterfaceType)
           
 void setContainerGuid(java.lang.String containerGuid)
           
 void setContainerName(java.lang.String containerName)
           
 void setInterceptors(org.jboss.aop.advice.Interceptor[] interceptors)
           
 void setTarget(java.lang.Object target)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionProxyInvocationHandlerBase

protected SessionProxyInvocationHandlerBase(java.lang.String containerName,
                                            java.lang.String containerGuid,
                                            org.jboss.aop.advice.Interceptor[] interceptors,
                                            java.lang.String businessInterfaceType,
                                            java.lang.Object target)
Constructor

Parameters:
containerName - The name of the target Container
containerGuid - The globally-unique name of the container
interceptors - The interceptors to apply to invocations upon this handler
businessInterfaceType - Possibly null FQN of business interface
target - The target object (Session ID)
Method Detail

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Required "invoke" as defined by InvocationHandler interface

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               org.jboss.ejb3.common.lang.SerializableMethod method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Overloaded "invoke" which takes into account a SerializableMethod view

Parameters:
proxy -
method -
args -
Returns:
Throws:
java.lang.Throwable

handleInvocationDirectly

protected java.lang.Object handleInvocationDirectly(java.lang.Object proxy,
                                                    java.lang.Object[] args,
                                                    java.lang.reflect.Method invokedMethod)
                                             throws NotEligibleForDirectInvocationException
Handles the current invocation directly in this invocation handler. Only a subset of method invocations are eligible for this treatment, else a NotEligibleForDirectInvocationException will be thrown

Parameters:
proxy -
args - Arguments of the current invocation
invokedMethod - The method invoked
Returns:
Throws:
NotEligibleForDirectInvocationException

invokeEquals

protected boolean invokeEquals(java.lang.Object proxy,
                               java.lang.Object argument)
Handles invocation of "equals(Object)" upon a Session Proxy EJB 3.0 Specification 3.4.5.1, 3.4.5.2

Parameters:
proxy -
args -
Returns:

invokeHashCode

protected int invokeHashCode(java.lang.Object proxy)
Handles invocation of "hashCode()" upon the proxy

Parameters:
proxy -
Returns:

getContainerLocally

protected org.jboss.ejb3.proxy.spi.container.InvokableContext getContainerLocally()
Returns the container housed locally

Returns:

createRemoteProxyToContainer

protected org.jboss.ejb3.proxy.spi.container.InvokableContext createRemoteProxyToContainer(java.lang.String url)
Creates and returns a Remoting Proxy to invoke upon the container This implementation is marked as FIXME as remoting should be an add-on capability atop ejb3-proxy

Parameters:
url - The location of the remote host holding the Container
Returns:

getContainer

protected abstract org.jboss.ejb3.proxy.spi.container.InvokableContext getContainer()
Obtains the Container upon which this Proxy should invoke

Returns:

getTarget

public java.lang.Object getTarget()
Specified by:
getTarget in interface SessionProxyInvocationHandler

setTarget

public void setTarget(java.lang.Object target)
Specified by:
setTarget in interface SessionProxyInvocationHandler

getContainerName

public java.lang.String getContainerName()
Specified by:
getContainerName in interface SessionProxyInvocationHandler

setContainerName

public void setContainerName(java.lang.String containerName)
Specified by:
setContainerName in interface SessionProxyInvocationHandler

getInterceptors

public org.jboss.aop.advice.Interceptor[] getInterceptors()
Specified by:
getInterceptors in interface SessionProxyInvocationHandler

setInterceptors

public void setInterceptors(org.jboss.aop.advice.Interceptor[] interceptors)
Specified by:
setInterceptors in interface SessionProxyInvocationHandler

getContainerGuid

public java.lang.String getContainerGuid()
Specified by:
getContainerGuid in interface SessionProxyInvocationHandler

setContainerGuid

public void setContainerGuid(java.lang.String containerGuid)
Specified by:
setContainerGuid in interface SessionProxyInvocationHandler

getBusinessInterfaceType

public java.lang.String getBusinessInterfaceType()
Specified by:
getBusinessInterfaceType in interface SessionProxyInvocationHandler

setBusinessInterfaceType

public void setBusinessInterfaceType(java.lang.String businessInterfaceType)
Specified by:
setBusinessInterfaceType in interface SessionProxyInvocationHandler