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
ObjectFactorythat creates aFeatureManager.The method
getConfiguration(Object)is used to obtain theTogglzConfiginstance to use for building the manager. The default implementation assumes that the supplied object is aReferencewith anRefAddrelement 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 ObjectcreateInstance(String classname)Creates an instance of the supplied class.protected TogglzConfiggetConfiguration(Object obj)This class looks up theTogglzConfigto use when building theFeatureManager.ObjectgetObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
-
-
-
Method Detail
-
getObjectInstance
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
- Specified by:
getObjectInstancein interfaceObjectFactory
-
getConfiguration
protected TogglzConfig getConfiguration(Object obj)
This class looks up theTogglzConfigto use when building theFeatureManager.- Parameters:
obj- TheObjectobtained fromgetObjectInstance(Object, Name, Context, Hashtable).
-
-