org.jboss.ejb3.proxy.factory
Class ProxyFactoryHelper

java.lang.Object
  extended by org.jboss.ejb3.proxy.factory.ProxyFactoryHelper

public class ProxyFactoryHelper
extends java.lang.Object

Comment


Constructor Summary
ProxyFactoryHelper()
           
 
Method Summary
static java.lang.reflect.Constructor<?> createProxyConstructor(java.lang.Class<?>[] interfaces, java.lang.ClassLoader cl)
          Create a Proxy Constructor for the specified interfaces, using the specified CL
static java.util.Set<java.lang.Class<?>> getBusinessInterfaces(java.lang.Class<?> beanClass)
          Resolve the potential business interfaces on an enterprise bean.
static java.util.Set<java.lang.Class<?>> getBusinessInterfaces(java.lang.Class<?> beanClass, boolean includeSupers)
          Resolve the potential business interfaces on an enterprise bean.
static java.lang.String getDefaultRemoteBusinessJndiName(EJBContainer container)
           
static java.lang.String getHomeJndiName(EJBContainer container)
           
static java.lang.String getJndiName(EJBContainer container, java.lang.Class<?> businessInterface)
          Obtains the JNDI name for the specified container; may either be explicitly-defined by annotation / XML or will otherwise default to the configured JNDI Binding Policy
static java.lang.Class<?>[] getLocalAndBusinessLocalInterfaces(Container container)
           
static java.lang.Class<?>[] getLocalBusinessInterfaces(Container container)
          Returns all local business interfaces in the specified container; interfaces marked as "local" via either annotation or XML and not extending EJBLocalObject
static java.lang.Class<?> getLocalHomeInterface(Container container)
           
static java.lang.String getLocalHomeJndiName(EJBContainer container)
           
static java.lang.Class<?>[] getLocalInterfaces(Container container)
          Returns all local interfaces in the specified container; interfaces marked as "local" via either annotation or XML and extending EJBLocalObject
static java.lang.String getLocalJndiName(EJBContainer container)
           
static java.lang.Class<?>[] getRemoteAndBusinessRemoteInterfaces(Container container)
          Returns all remote and remote business interfaces in the specified container, designated by @Remote or in ejb-jar.xml as "remote" or "business-remote"
static java.lang.Class<?>[] getRemoteBusinessInterfaces(Container container)
          Returns all remote business interfaces in the specified container; interfaces marked as "remote" via either annotation or XML and not extending EJBObject
static java.lang.String getRemoteBusinessJndiName(EJBContainer container)
           
static java.lang.String getRemoteBusinessJndiName(EJBContainer container, boolean check)
           
static java.lang.String getRemoteBusinessJndiName(EJBContainer container, org.jboss.ejb3.annotation.RemoteBinding binding, boolean conflictCheck)
           
static java.lang.Class<?> getRemoteHomeInterface(Container container)
           
static java.lang.Class<?>[] getRemoteInterfaces(Container container)
          Returns all remote interfaces in the specified container; interfaces marked as "remote" via either annotation or XML and extending EJBObject
static boolean publishesInterface(Container container, java.lang.Class<?> businessInterface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyFactoryHelper

public ProxyFactoryHelper()
Method Detail

getLocalAndBusinessLocalInterfaces

public static java.lang.Class<?>[] getLocalAndBusinessLocalInterfaces(Container container)
Parameters:
container -
Returns:
the local interfaces of the container or an empty array

getBusinessInterfaces

public static java.util.Set<java.lang.Class<?>> getBusinessInterfaces(java.lang.Class<?> beanClass)
Resolve the potential business interfaces on an enterprise bean. Returns all interfaces implemented by this class and its supers which are potentially a business interface. Note: for normal operation call container.getBusinessInterfaces().

Parameters:
beanClass - the EJB implementation class
Returns:
a list of potential business interfaces
See Also:
EJBContainer.getBusinessAndComponentInterfaces()

getBusinessInterfaces

public static java.util.Set<java.lang.Class<?>> getBusinessInterfaces(java.lang.Class<?> beanClass,
                                                                      boolean includeSupers)
Resolve the potential business interfaces on an enterprise bean. Returns all interfaces implemented by this class and, optionally, its supers which are potentially a business interface. Note: for normal operation call container.getBusinessInterfaces().

Parameters:
beanClass - the EJB implementation class
includeSupers - Whether or not to include superclasses of the specified beanClass in this check
Returns:
a list of potential business interfaces
See Also:
EJBContainer.getBusinessAndComponentInterfaces()

getLocalHomeInterface

public static java.lang.Class<?> getLocalHomeInterface(Container container)

getRemoteHomeInterface

public static java.lang.Class<?> getRemoteHomeInterface(Container container)

publishesInterface

public static boolean publishesInterface(Container container,
                                         java.lang.Class<?> businessInterface)

getJndiName

public static java.lang.String getJndiName(EJBContainer container,
                                           java.lang.Class<?> businessInterface)
Obtains the JNDI name for the specified container; may either be explicitly-defined by annotation / XML or will otherwise default to the configured JNDI Binding Policy

Parameters:
container -
businessInterface -
Returns:

getLocalInterfaces

public static java.lang.Class<?>[] getLocalInterfaces(Container container)
Returns all local interfaces in the specified container; interfaces marked as "local" via either annotation or XML and extending EJBLocalObject

Parameters:
container -
Returns:

getRemoteInterfaces

public static java.lang.Class<?>[] getRemoteInterfaces(Container container)
Returns all remote interfaces in the specified container; interfaces marked as "remote" via either annotation or XML and extending EJBObject

Parameters:
container -
Returns:

getLocalBusinessInterfaces

public static java.lang.Class<?>[] getLocalBusinessInterfaces(Container container)
Returns all local business interfaces in the specified container; interfaces marked as "local" via either annotation or XML and not extending EJBLocalObject

Parameters:
container -
Returns:

getRemoteBusinessInterfaces

public static java.lang.Class<?>[] getRemoteBusinessInterfaces(Container container)
Returns all remote business interfaces in the specified container; interfaces marked as "remote" via either annotation or XML and not extending EJBObject

Parameters:
container -
Returns:

getRemoteAndBusinessRemoteInterfaces

public static java.lang.Class<?>[] getRemoteAndBusinessRemoteInterfaces(Container container)
Returns all remote and remote business interfaces in the specified container, designated by @Remote or in ejb-jar.xml as "remote" or "business-remote"

Parameters:
container -
Returns:
the remote interfaces of the container or an empty array

createProxyConstructor

public static java.lang.reflect.Constructor<?> createProxyConstructor(java.lang.Class<?>[] interfaces,
                                                                      java.lang.ClassLoader cl)
                                                               throws java.lang.Exception
Create a Proxy Constructor for the specified interfaces, using the specified CL

Parameters:
interfaces -
cl -
Returns:
Throws:
java.lang.Exception

getHomeJndiName

public static java.lang.String getHomeJndiName(EJBContainer container)

getLocalHomeJndiName

public static java.lang.String getLocalHomeJndiName(EJBContainer container)

getLocalJndiName

public static java.lang.String getLocalJndiName(EJBContainer container)

getRemoteBusinessJndiName

public static java.lang.String getRemoteBusinessJndiName(EJBContainer container)

getRemoteBusinessJndiName

public static java.lang.String getRemoteBusinessJndiName(EJBContainer container,
                                                         boolean check)

getRemoteBusinessJndiName

public static java.lang.String getRemoteBusinessJndiName(EJBContainer container,
                                                         org.jboss.ejb3.annotation.RemoteBinding binding,
                                                         boolean conflictCheck)

getDefaultRemoteBusinessJndiName

public static java.lang.String getDefaultRemoteBusinessJndiName(EJBContainer container)