org.apache.turbine.services.component
Class TurbineComponentService

java.lang.Object
  |
  +--org.apache.turbine.services.BaseInitable
        |
        +--org.apache.turbine.services.BaseService
              |
              +--org.apache.turbine.services.TurbineBaseService
                    |
                    +--org.apache.turbine.services.component.TurbineComponentService
All Implemented Interfaces:
ComponentService, Initable, Service

public class TurbineComponentService
extends TurbineBaseService
implements ComponentService

An implementation of ComponentService which loads all the components given in the TurbineResources.properties File

Version:
$Id: TurbineComponentService.java,v 1.5 2002/08/14 16:44:09 henning Exp $
Author:
Henning P. Schmiedehausen

Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, properties, serviceBroker
 
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
 
Fields inherited from interface org.apache.turbine.services.component.ComponentService
SERVICE_NAME
 
Constructor Summary
TurbineComponentService()
           
 
Method Summary
 void init()
          Load all configured components and initialize them.
 void init(javax.servlet.ServletConfig config)
          Inits the service using servlet parameters to obtain path to the configuration file.
 void shutdown()
          Shuts the Component Service down, calls dispose on the components that implement this interface
 
Methods inherited from class org.apache.turbine.services.TurbineBaseService
init, init
 
Methods inherited from class org.apache.turbine.services.BaseService
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
 
Methods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, setInit, setInitableBroker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, setInitableBroker
 

Constructor Detail

TurbineComponentService

public TurbineComponentService()
Method Detail

init

public void init()
          throws InitializationException
Load all configured components and initialize them. This is a zero parameter variant which queries the Turbine Servlet for its config.
Specified by:
init in interface Initable
Overrides:
init in class TurbineBaseService
Throws:
InitializationException - Something went wrong in the init stage

init

public void init(javax.servlet.ServletConfig config)
          throws InitializationException
Inits the service using servlet parameters to obtain path to the configuration file. Change relatives paths.
Overrides:
init in class TurbineBaseService
Parameters:
config - The ServletConfiguration from Turbine
Throws:
InitializationException - Something went wrong when starting up.

shutdown

public void shutdown()
Shuts the Component Service down, calls dispose on the components that implement this interface
Specified by:
shutdown in interface Initable
Overrides:
shutdown in class TurbineBaseService


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.