org.jboss.ejb3.proxy.impl.factory.session
Class SessionProxyFactoryBase

java.lang.Object
  extended by org.jboss.ejb3.proxy.impl.factory.ProxyFactoryBase
      extended by org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactoryBase
All Implemented Interfaces:
ProxyFactory, SessionProxyFactory, SessionSpecProxyFactory
Direct Known Subclasses:
StatefulSessionProxyFactoryBase, StatelessSessionProxyFactoryBase

public abstract class SessionProxyFactoryBase
extends ProxyFactoryBase
implements SessionSpecProxyFactory

SessionProxyFactoryBase Base upon which Session Proxy Factory implementations may build

Version:
$Revision: $
Author:
ALR

Constructor Summary
SessionProxyFactoryBase(String name, String containerName, String containerGuid, org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData metadata, ClassLoader classloader, org.jboss.aop.Advisor advisor)
          Constructor
 
Method Summary
protected abstract  SessionProxyInvocationHandler createBusinessDefaultInvocationHandler()
          Returns the Constructor of the SessionProxyInvocationHandler to be used in instanciating new handlers to specify in Proxy Creation Used for creating a Handler for a Business Default proxy
protected abstract  SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(String businessInterfaceName)
          Returns the Constructor of the SessionProxyInvocationHandler to be used in instanciating new handlers to specify in Proxy Creation Used for creating a Handler for a Business Interface-specific proxy
protected abstract  SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler()
          Returns the Constructor of the SessionProxyInvocationHandler to be used in instanciating new handlers to specify in Proxy Creation Used for creating a Handler for an EJB2.x Component Interface proxy
protected abstract  SessionProxyInvocationHandler createHomeInvocationHandler()
          Returns the Constructor of the SessionProxyInvocationHandler to be used in instanciating new handlers to specify in Proxy Creation Used for creating a Handler for am EJB2.x Home proxy
 Object createProxyBusiness(String businessInterfaceName)
          Create an EJB3 Business Proxy specific to the specified target business interface name (expressed as a fully-qualified class name)
 Object createProxyDefault()
          Create an EJB3 Business proxy with no specific target business interface.
 Object createProxyEjb2x()
          Create an EJB2.x Proxy
 Object createProxyHome()
          Create an EJB2.x Home Proxy
protected abstract  Set<String> getBusinessInterfaceTypes()
          Returns the a Set of String representations of the Business Interface Types
protected  Constructor<?> getConstructorProxyDefault()
           
protected  Constructor<?> getConstructorProxyEjb2x()
           
protected  Constructor<?> getConstructorProxyHome()
           
protected  Map<String,Constructor<?>> getConstructorsProxySpecificBusinessInterface()
           
protected abstract  String getEjb2xInterfaceType()
          Returns the String representation of the EJB2.x Interface Types
protected abstract  String getHomeType()
          Returns the String representation of the Home Interface Type
 org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData getMetadata()
           
protected abstract  Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface)
          Obtains the return types declared by the "create" methods for the specified home interface.
protected  Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface, boolean isStateless)
          Deprecated. http://jira.jboss.com/jira/browse/JBMETA-41
protected  void setConstructorProxyDefault(Constructor<?> constructorProxyDefault)
           
protected  void setConstructorProxyEjb2x(Constructor<?> constructorProxyEjb2x)
           
protected  void setConstructorProxyHome(Constructor<?> constructorProxyHome)
           
protected  void setConstructorsProxySpecificBusinessInterface(Map<String,Constructor<?>> constructorsProxySpecificBusinessInterface)
           
protected  void setMetadata(org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData metadata)
           
 void start()
          Lifecycle callback to be invoked before the ProxyFactory is able to service requests
 void stop()
          Lifecycle callback to be invoked by the ProxyFactoryDeployer before the ProxyFactory is taken out of service, possibly GC'd
 
Methods inherited from class org.jboss.ejb3.proxy.impl.factory.ProxyFactoryBase
createProxyConstructor, getAdvisor, getClassLoader, getCommonProxyInterfaces, getContainerGuid, getContainerName, getInterceptors, getInterceptorStackName, getName, setClassLoader, setContainerName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.ejb3.proxy.impl.factory.ProxyFactory
getName
 

Constructor Detail

SessionProxyFactoryBase

public SessionProxyFactoryBase(String name,
                               String containerName,
                               String containerGuid,
                               org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData metadata,
                               ClassLoader classloader,
                               org.jboss.aop.Advisor advisor)
Constructor

Parameters:
name - The unique name for this ProxyFactory
containerName - The name of the InvokableContext (container) upon which Proxies will invoke
containerGuid - The globally-unique name of the container
metadata - The metadata representing this Session Bean
classloader - The ClassLoader associated with the Container's Bean Class for which this ProxyFactory is to generate Proxies
advisor - The Advisor for proxies created by this factory
Method Detail

createProxyHome

public Object createProxyHome()
Create an EJB2.x Home Proxy

Specified by:
createProxyHome in interface SessionSpecProxyFactory
Returns:

createProxyDefault

public Object createProxyDefault()
Create an EJB3 Business proxy with no specific target business interface. The returned proxy will implement all appropriate business interfaces. Additionally, if the Home interface is bound alongside the Default (same JNDI Name), this Proxy will implement the Home interface as well.

Specified by:
createProxyDefault in interface SessionProxyFactory
Returns:

createProxyBusiness

public Object createProxyBusiness(String businessInterfaceName)
Create an EJB3 Business Proxy specific to the specified target business interface name (expressed as a fully-qualified class name)

Specified by:
createProxyBusiness in interface SessionSpecProxyFactory
Parameters:
businessInterfaceName -
Returns:

createProxyEjb2x

public Object createProxyEjb2x()
Create an EJB2.x Proxy

Specified by:
createProxyEjb2x in interface SessionSpecProxyFactory
Returns:

start

public void start()
           throws Exception
Lifecycle callback to be invoked before the ProxyFactory is able to service requests

Specified by:
start in interface ProxyFactory
Overrides:
start in class ProxyFactoryBase
Throws:
Exception

stop

public void stop()
          throws Exception
Lifecycle callback to be invoked by the ProxyFactoryDeployer before the ProxyFactory is taken out of service, possibly GC'd

Specified by:
stop in interface ProxyFactory
Overrides:
stop in class ProxyFactoryBase
Throws:
Exception

getReturnTypesFromCreateMethods

@Deprecated
protected Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface,
                                                                   boolean isStateless)
Deprecated. http://jira.jboss.com/jira/browse/JBMETA-41

Obtains the return types declared by the "create" methods for the specified home interface. EJB3 Core Specification 3.6.2.1 JIRA: EJBTHREE-1127

Parameters:
homeInterface -
isStateless - Flag to indicate whether this is for a Stateful or Stateless container
Returns:

getBusinessInterfaceTypes

protected abstract Set<String> getBusinessInterfaceTypes()
Returns the a Set of String representations of the Business Interface Types

Returns:

getHomeType

protected abstract String getHomeType()
Returns the String representation of the Home Interface Type

Returns:

getEjb2xInterfaceType

protected abstract String getEjb2xInterfaceType()
Returns the String representation of the EJB2.x Interface Types

Returns:

getReturnTypesFromCreateMethods

protected abstract Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface)
Obtains the return types declared by the "create" methods for the specified home interface.

Parameters:
homeInterface -
Returns:

createBusinessInterfaceSpecificInvocationHandler

protected abstract SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(String businessInterfaceName)
Returns the Constructor of the SessionProxyInvocationHandler to be used in instanciating new handlers to specify in Proxy Creation Used for creating a Handler for a Business Interface-specific proxy

Returns:

createBusinessDefaultInvocationHandler

protected abstract SessionProxyInvocationHandler createBusinessDefaultInvocationHandler()
Returns the Constructor of the SessionProxyInvocationHandler to be used in instanciating new handlers to specify in Proxy Creation Used for creating a Handler for a Business Default proxy

Returns:

createEjb2xComponentInterfaceInvocationHandler

protected abstract SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler()
Returns the Constructor of the SessionProxyInvocationHandler to be used in instanciating new handlers to specify in Proxy Creation Used for creating a Handler for an EJB2.x Component Interface proxy

Returns:

createHomeInvocationHandler

protected abstract SessionProxyInvocationHandler createHomeInvocationHandler()
Returns the Constructor of the SessionProxyInvocationHandler to be used in instanciating new handlers to specify in Proxy Creation Used for creating a Handler for am EJB2.x Home proxy

Returns:

getMetadata

public org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData getMetadata()

setMetadata

protected void setMetadata(org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData metadata)

getConstructorProxyDefault

protected Constructor<?> getConstructorProxyDefault()

setConstructorProxyDefault

protected void setConstructorProxyDefault(Constructor<?> constructorProxyDefault)

getConstructorsProxySpecificBusinessInterface

protected Map<String,Constructor<?>> getConstructorsProxySpecificBusinessInterface()

setConstructorsProxySpecificBusinessInterface

protected void setConstructorsProxySpecificBusinessInterface(Map<String,Constructor<?>> constructorsProxySpecificBusinessInterface)

getConstructorProxyHome

protected Constructor<?> getConstructorProxyHome()

setConstructorProxyHome

protected void setConstructorProxyHome(Constructor<?> constructorProxyHome)

getConstructorProxyEjb2x

protected Constructor<?> getConstructorProxyEjb2x()

setConstructorProxyEjb2x

protected void setConstructorProxyEjb2x(Constructor<?> constructorProxyEjb2x)


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