@Service @Singleton public class NamingUtilsImpl extends Object implements NamingUtils
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_COPY_MUTABLE |
Constructor and Description |
---|
NamingUtilsImpl() |
public static final String EXCEPTION_COPY_MUTABLE
public NamingObjectFactory createSimpleNamingObjectFactory(String name, Object value)
NamingUtils
SimpleNamingObjectFactory
createSimpleNamingObjectFactory
in interface NamingUtils
name
- the name of the object. This will be ignoredvalue
- the object that the create method of the factory will returnpublic NamingObjectFactory createLazyNamingObjectFactory(String name, String jndiName, boolean cacheResult)
NamingUtils
JndiNamingObjectFactory
createLazyNamingObjectFactory
in interface NamingUtils
name
- the name of the objectjndiName
- the jndi name of the object to create/lookupcacheResult
- whether the result may have been cachedpublic NamingObjectFactory createLazyInitializationNamingObjectFactory(String name, String jndiName, boolean cacheResult)
createLazyInitializationNamingObjectFactory
in interface NamingUtils
public NamingObjectFactory createCloningNamingObjectFactory(String name, Object value)
NamingUtils
CloningNamingObjectFactory
that will create copies of the given object.createCloningNamingObjectFactory
in interface NamingUtils
name
- the name of the objectvalue
- the object that will be copied when create is calledpublic NamingObjectFactory createCloningNamingObjectFactory(String name, NamingObjectFactory delegate)
NamingUtils
CloningNamingObjectFactory
that will create copies of the object created by the delegate.createCloningNamingObjectFactory
in interface NamingUtils
name
- the name of the objectdelegate
- the NamingObjectFactory
that creates the object that will then be copiedpublic NamingObjectFactory createDelegatingNamingObjectFactory(String name, NamingObjectFactory delegate, boolean cacheResult)
NamingUtils
DelegatingNamingObjectFactory
that will use another NamingObjectFactory
to do the workcreateDelegatingNamingObjectFactory
in interface NamingUtils
name
- name of objectdelegate
- NamingObjectFactory
to do the workcacheResult
- whether the result may have been cachedpublic Object makeCopyOfObject(Object obj)
NamingUtils
Serializable
makeCopyOfObject
in interface NamingUtils
obj
- a non-serializable objectCopyright © 2018. All rights reserved.