org.jboss.ejb3.proxy.objectfactory
Class ProxyObjectFactory

java.lang.Object
  extended by org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory
All Implemented Interfaces:
java.io.Serializable, javax.naming.spi.ObjectFactory
Direct Known Subclasses:
Ejb3RegistrarProxyObjectFactory

public abstract class ProxyObjectFactory
extends java.lang.Object
implements javax.naming.spi.ObjectFactory, java.io.Serializable

ProxyObjectFactory Base upon which Proxy Object Factories may build. Defines abstractions to:

See Also:
Serialized Form

Constructor Summary
ProxyObjectFactory()
           
 
Method Summary
protected  ProxyFactory createProxyFactoryProxy(javax.naming.Name name, java.util.Map<java.lang.String,java.util.List<java.lang.String>> refAddrs, java.lang.String proxyFactoryRegistryKey)
          Creates a remoting proxy to the proxy factory.
 java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable<?,?> environment)
          Returns an appropriate Proxy based on the Reference Address information associated with the Reference (obj) bound at name in the specified nameCtx with specified environment.
protected abstract  java.lang.Object getProxy(ProxyFactory proxyFactory, javax.naming.Name name, java.util.Map<java.lang.String,java.util.List<java.lang.String>> referenceAddresses)
           
protected abstract  java.lang.Class<?> getProxyFactoryClass()
          Obtains the type or supertype used by proxy factories for this Object Factory
protected  java.lang.String getSingleReferenceAddressValue(javax.naming.Name name, java.util.Map<java.lang.String,java.util.List<java.lang.String>> referenceAddresses, java.lang.String refAddrType)
          Obtains the single value of the specified type as obtained from the specified reference addresses bound at the specified Name.
protected  java.lang.String getSingleRequiredReferenceAddressValue(javax.naming.Name name, java.util.Map<java.lang.String,java.util.List<java.lang.String>> referenceAddresses, java.lang.String refAddrType)
          Obtains the single value of the specified type as obtained from the specified reference addresses bound at the specified Name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyObjectFactory

public ProxyObjectFactory()
Method Detail

getObjectInstance

public java.lang.Object getObjectInstance(java.lang.Object obj,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable<?,?> environment)
                                   throws java.lang.Exception
Returns an appropriate Proxy based on the Reference Address information associated with the Reference (obj) bound at name in the specified nameCtx with specified environment.

Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Throws:
java.lang.Exception
See Also:
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)

createProxyFactoryProxy

protected ProxyFactory createProxyFactoryProxy(javax.naming.Name name,
                                               java.util.Map<java.lang.String,java.util.List<java.lang.String>> refAddrs,
                                               java.lang.String proxyFactoryRegistryKey)
                                        throws java.lang.Exception
Creates a remoting proxy to the proxy factory.

Parameters:
name -
refAddrs -
proxyFactoryRegistryKey -
Returns:
Throws:
java.lang.Exception

getSingleRequiredReferenceAddressValue

protected java.lang.String getSingleRequiredReferenceAddressValue(javax.naming.Name name,
                                                                  java.util.Map<java.lang.String,java.util.List<java.lang.String>> referenceAddresses,
                                                                  java.lang.String refAddrType)
Obtains the single value of the specified type as obtained from the specified reference addresses bound at the specified Name. Asserts that the value exists and is the only one for the specified type.

Parameters:
name -
referenceAddresses -
refAddrType -
Returns:

getSingleReferenceAddressValue

protected java.lang.String getSingleReferenceAddressValue(javax.naming.Name name,
                                                          java.util.Map<java.lang.String,java.util.List<java.lang.String>> referenceAddresses,
                                                          java.lang.String refAddrType)
Obtains the single value of the specified type as obtained from the specified reference addresses bound at the specified Name. Asserts that the value exists and is the only one for the specified type.

Parameters:
name -
referenceAddresses -
refAddrType -
Returns:

getProxy

protected abstract java.lang.Object getProxy(ProxyFactory proxyFactory,
                                             javax.naming.Name name,
                                             java.util.Map<java.lang.String,java.util.List<java.lang.String>> referenceAddresses)

getProxyFactoryClass

protected abstract java.lang.Class<?> getProxyFactoryClass()
Obtains the type or supertype used by proxy factories for this Object Factory

Returns: