org.apache.pluto.portalImpl.services.factorymanager
Class FactoryManagerServiceImpl

java.lang.Object
  extended by org.apache.pluto.portalImpl.services.Service
      extended by org.apache.pluto.portalImpl.services.factorymanager.FactoryManagerService
          extended by 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

Field Summary
private static java.lang.String CONFIG_FACTORY_PRE
           
private  java.util.List factoryList
           
private  java.util.Map factoryMap
           
 
Constructor Summary
FactoryManagerServiceImpl()
           
 
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 org.apache.pluto.portalImpl.services.Service
destroy, init, postInit, postInit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

FactoryManagerServiceImpl

public FactoryManagerServiceImpl()
Method Detail

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 configuration
aProperties - 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