Package com.sun.enterprise.naming.util
Class NamingUtilsImpl
- java.lang.Object
-
- com.sun.enterprise.naming.util.NamingUtilsImpl
-
- All Implemented Interfaces:
NamingUtils
@Service @Singleton public class NamingUtilsImpl extends Object implements NamingUtils
This is a utils class for refactoring the following method.
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXCEPTION_COPY_MUTABLE
-
Constructor Summary
Constructors Constructor Description NamingUtilsImpl()
-
Method Summary
-
-
-
Field Detail
-
EXCEPTION_COPY_MUTABLE
public static final String EXCEPTION_COPY_MUTABLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
createSimpleNamingObjectFactory
public NamingObjectFactory createSimpleNamingObjectFactory(String name, Object value)
Description copied from interface:NamingUtils
Creates an instance ofSimpleNamingObjectFactory
- Specified by:
createSimpleNamingObjectFactory
in interfaceNamingUtils
- Parameters:
name
- the name of the object. This will be ignoredvalue
- the object that the create method of the factory will return- Returns:
-
createLazyNamingObjectFactory
public NamingObjectFactory createLazyNamingObjectFactory(String name, String jndiName, boolean cacheResult)
Description copied from interface:NamingUtils
Creates an instance ofJndiNamingObjectFactory
- Specified by:
createLazyNamingObjectFactory
in interfaceNamingUtils
- Parameters:
name
- the name of the objectjndiName
- the jndi name of the object to create/lookupcacheResult
- whether the result may have been cached- Returns:
-
createLazyInitializationNamingObjectFactory
public NamingObjectFactory createLazyInitializationNamingObjectFactory(String name, String jndiName, boolean cacheResult)
- Specified by:
createLazyInitializationNamingObjectFactory
in interfaceNamingUtils
- Returns:
-
createCloningNamingObjectFactory
public NamingObjectFactory createCloningNamingObjectFactory(String name, Object value)
Description copied from interface:NamingUtils
Creates an instance ofCloningNamingObjectFactory
that will create copies of the given object.- Specified by:
createCloningNamingObjectFactory
in interfaceNamingUtils
- Parameters:
name
- the name of the objectvalue
- the object that will be copied when create is called- Returns:
-
createCloningNamingObjectFactory
public NamingObjectFactory createCloningNamingObjectFactory(String name, NamingObjectFactory delegate)
Description copied from interface:NamingUtils
Creates an instance ofCloningNamingObjectFactory
that will create copies of the object created by the delegate.- Specified by:
createCloningNamingObjectFactory
in interfaceNamingUtils
- Parameters:
name
- the name of the objectdelegate
- theNamingObjectFactory
that creates the object that will then be copied- Returns:
-
createDelegatingNamingObjectFactory
public NamingObjectFactory createDelegatingNamingObjectFactory(String name, NamingObjectFactory delegate, boolean cacheResult)
Description copied from interface:NamingUtils
Creates an instance ofDelegatingNamingObjectFactory
that will use anotherNamingObjectFactory
to do the work- Specified by:
createDelegatingNamingObjectFactory
in interfaceNamingUtils
- Parameters:
name
- name of objectdelegate
-NamingObjectFactory
to do the workcacheResult
- whether the result may have been cached- Returns:
-
makeCopyOfObject
public Object makeCopyOfObject(Object obj)
Description copied from interface:NamingUtils
Makes a new instance of the specified object. Object cannot implementSerializable
- Specified by:
makeCopyOfObject
in interfaceNamingUtils
- Parameters:
obj
- a non-serializable object- Returns:
-
-