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:
Serializable, InvocationHandler, SessionProxyInvocationHandler
Direct Known Subclasses:
SessionLocalProxyInvocationHandler, SessionRemoteProxyInvocationHandler

public abstract class SessionProxyInvocationHandlerBase
extends Object
implements SessionProxyInvocationHandler, Serializable

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

Version:
$Revision: $
Author:
ALR
See Also:
Serialized Form

Constructor Summary
protected SessionProxyInvocationHandlerBase(String containerName, String containerGuid, org.jboss.aop.advice.Interceptor[] interceptors, String businessInterfaceType, Object target)
          Constructor
 
Method Summary
protected  org.jboss.ejb3.proxy.spi.container.InvokableContext createRemoteProxyToContainer(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
 String getBusinessInterfaceType()
           
protected abstract  org.jboss.ejb3.proxy.spi.container.InvokableContext getContainer()
          Obtains the Container upon which this Proxy should invoke
 String getContainerGuid()
           
protected  org.jboss.ejb3.proxy.spi.container.InvokableContext getContainerLocally()
          Returns the container housed locally
 String getContainerName()
           
 org.jboss.aop.advice.Interceptor[] getInterceptors()
           
 Object getTarget()
           
protected  Object handleInvocationDirectly(Object proxy, Object[] args, Method invokedMethod)
          Handles the current invocation directly in this invocation handler.
 Object invoke(Object proxy, Method method, Object[] args)
          Required "invoke" as defined by InvocationHandler interface
 Object invoke(Object proxy, org.jboss.ejb3.common.lang.SerializableMethod method, Object[] args)
          Overloaded "invoke" which takes into account a SerializableMethod view
protected  boolean invokeEquals(Object proxy, 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(Object proxy)
          Handles invocation of "hashCode()" upon the proxy
 void setBusinessInterfaceType(String businessInterfaceType)
           
 void setContainerGuid(String containerGuid)
           
 void setContainerName(String containerName)
           
 void setInterceptors(org.jboss.aop.advice.Interceptor[] interceptors)
           
 void setTarget(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(String containerName,
                                            String containerGuid,
                                            org.jboss.aop.advice.Interceptor[] interceptors,
                                            String businessInterfaceType,
                                            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 Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Required "invoke" as defined by InvocationHandler interface

Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

invoke

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

Parameters:
proxy -
method -
args -
Returns:
Throws:
Throwable

handleInvocationDirectly

protected Object handleInvocationDirectly(Object proxy,
                                          Object[] args,
                                          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(Object proxy,
                               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(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(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 Object getTarget()
Specified by:
getTarget in interface SessionProxyInvocationHandler

setTarget

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

getContainerName

public String getContainerName()
Specified by:
getContainerName in interface SessionProxyInvocationHandler

setContainerName

public void setContainerName(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 String getContainerGuid()
Specified by:
getContainerGuid in interface SessionProxyInvocationHandler

setContainerGuid

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

getBusinessInterfaceType

public String getBusinessInterfaceType()
Specified by:
getBusinessInterfaceType in interface SessionProxyInvocationHandler

setBusinessInterfaceType

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


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.