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
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
.getObjectInstance
(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment)
-
Constructor Details
-
FeatureManagerObjectFactory
public FeatureManagerObjectFactory()
-
-
Method Details
-
getObjectInstance
- Specified by:
getObjectInstance
in interfaceObjectFactory
-
getConfiguration
This class looks up theTogglzConfig
to use when building theFeatureManager
.- Parameters:
obj
- TheObject
obtained fromgetObjectInstance(Object, Name, Context, Hashtable)
.
-
createInstance
Creates an instance of the supplied class.
-