org.apache.pluto.portalImpl.services.factorymanager
Class FactoryManagerServiceImpl
java.lang.Object
org.apache.pluto.portalImpl.services.Service
org.apache.pluto.portalImpl.services.factorymanager.FactoryManagerService
org.apache.pluto.portalImpl.services.factorymanager.FactoryManagerServiceImpl
public class FactoryManagerServiceImpl
- extends FactoryManagerService
Manages the life-time of factories registered during container startup.
A service has to derive from Factory
and implement the
init()
and destroy()
methods as appropriate.
- See Also:
Factory
Method Summary |
protected void |
destroy(ServletConfig config)
Destroys all services. |
Factory |
getFactory(java.lang.Class theClass)
Returns the service implementation for the given service class, or
null if no such service is registered. |
protected void |
init(ServletConfig config,
Properties aProperties)
Initializes all factories specified in the configuration beginning with 'factory.'. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIG_FACTORY_PRE
private static final java.lang.String CONFIG_FACTORY_PRE
- See Also:
- Constant Field Values
factoryMap
private java.util.Map factoryMap
factoryList
private java.util.List factoryList
FactoryManagerServiceImpl
public FactoryManagerServiceImpl()
init
protected void init(ServletConfig config,
Properties aProperties)
throws java.lang.Exception
- Initializes all factories specified in the configuration beginning with 'factory.'.
By specifying a different implementation of the factory the behaviour
of the portlet container can be modified.
- Overrides:
init
in class Service
- Parameters:
config
- the servlet configurationaProperties
- the service properties
- Throws:
java.lang.Exception
- if initializing any of the factories fails
destroy
protected void destroy(ServletConfig config)
- Destroys all services.
- Overrides:
destroy
in class Service
- Parameters:
config
- the servlet configuration
getFactory
public Factory getFactory(java.lang.Class theClass)
- Returns the service implementation for the given service class, or
null
if no such service is registered.
- Specified by:
getFactory
in class FactoryManagerService
- Parameters:
theClass
- the service class
- Returns:
- the service implementation