Package org.togglz.core.jndi
Class FeatureManagerObjectFactory
java.lang.Object
org.togglz.core.jndi.FeatureManagerObjectFactory
- All Implemented Interfaces:
ObjectFactory
Implementation of ObjectFactory that creates a FeatureManager.
The method getConfiguration(Object) is used to obtain the TogglzConfig instance to use for building the
manager. The default implementation assumes that the supplied object is a Reference with an RefAddr element
with the name togglzConfig. 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectcreateInstance(String classname) Creates an instance of the supplied class.protected TogglzConfiggetConfiguration(Object obj) This class looks up theTogglzConfigto use when building theFeatureManager.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment)
-
Constructor Details
-
FeatureManagerObjectFactory
public FeatureManagerObjectFactory()
-
-
Method Details
-
getObjectInstance
- Specified by:
getObjectInstancein interfaceObjectFactory
-
getConfiguration
This class looks up theTogglzConfigto use when building theFeatureManager.- Parameters:
obj- TheObjectobtained fromgetObjectInstance(Object, Name, Context, Hashtable).
-
createInstance
Creates an instance of the supplied class.
-