Package org.togglz.core.jndi
Class FeatureManagerObjectFactory
- java.lang.Object
-
- org.togglz.core.jndi.FeatureManagerObjectFactory
-
- All Implemented Interfaces:
ObjectFactory
public class FeatureManagerObjectFactory extends Object implements ObjectFactory
Implementation of
ObjectFactory
that creates aFeatureManager
.The method
getConfiguration(Object)
is used to obtain theTogglzConfig
instance to use for building the manager. The default implementation assumes that the supplied object is aReference
with anRefAddr
element with the nametogglzConfig
. This behavior can be changed by overwriting this method.- Author:
- Christian Kaltepoth
- See Also:
- "http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html#Adding_Custom_Resource_Factories"
-
-
Constructor Summary
Constructors Constructor Description FeatureManagerObjectFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
createInstance(String classname)
Creates an instance of the supplied class.protected TogglzConfig
getConfiguration(Object obj)
This class looks up theTogglzConfig
to use when building theFeatureManager
.Object
getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
-
-
-
Method Detail
-
getObjectInstance
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
- Specified by:
getObjectInstance
in interfaceObjectFactory
-
getConfiguration
protected TogglzConfig getConfiguration(Object obj)
This class looks up theTogglzConfig
to use when building theFeatureManager
.- Parameters:
obj
- TheObject
obtained fromgetObjectInstance(Object, Name, Context, Hashtable)
.
-
-