Package com.sun.enterprise.naming.util
Class CloningNamingObjectFactory
- java.lang.Object
-
- com.sun.enterprise.naming.util.CloningNamingObjectFactory
-
- All Implemented Interfaces:
NamingObjectFactory
,NamingObjectProxy
@Service public class CloningNamingObjectFactory extends Object implements NamingObjectFactory
Factory that will create copies of the given object. This class is not cacheable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.naming.NamingObjectProxy
NamingObjectProxy.InitializationNamingObjectProxy
-
-
Constructor Summary
Constructors Constructor Description CloningNamingObjectFactory(String name, NamingObjectFactory delegate)
Creates a factory that will create copies of whatever the delegate us to holdCloningNamingObjectFactory(String name, Object value)
Creates a factory that will create copies of the given value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
create(Context ic)
Create and return an object.boolean
isCreateResultCacheable()
Tells if the result of create() is cacheable.
-
-
-
Constructor Detail
-
CloningNamingObjectFactory
public CloningNamingObjectFactory(String name, Object value)
Creates a factory that will create copies of the given value- Parameters:
name
- name of object. Ignoredvalue
- object that will be cloned when create is called
-
CloningNamingObjectFactory
public CloningNamingObjectFactory(String name, NamingObjectFactory delegate)
Creates a factory that will create copies of whatever the delegate us to hold- Parameters:
name
- name of object. Ignoreddelegate
- Factory to hold the object which will be copied.
-
-
Method Detail
-
isCreateResultCacheable
public boolean isCreateResultCacheable()
Description copied from interface:NamingObjectFactory
Tells if the result of create() is cacheable. If so the naming manager will replace this object factory with the object itself.- Specified by:
isCreateResultCacheable
in interfaceNamingObjectFactory
- Returns:
- true if the result of create() can be cached
-
create
public Object create(Context ic) throws NamingException
Description copied from interface:NamingObjectProxy
Create and return an object.- Specified by:
create
in interfaceNamingObjectProxy
- Returns:
- an object
- Throws:
NamingException
-
-