Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.turbine.services
Class TurbineBaseService

    java.lang.Object
      org.apache.turbine.services.BaseInitable
          org.apache.turbine.services.BaseService
              org.apache.turbine.services.TurbineBaseService

All Implemented Interfaces:
  Initable, Service

Direct Known Subclasses:
  BaseSecurityService, BaseTemplateEngineService, TurbineAssemblerBrokerService, TurbineAvalonComponentService, TurbineJsonRpcService, TurbineNamingService, TurbinePullService, TurbineRunDataService, TurbineSchedulerService, TurbineServletService, TurbineSessionService, TurbineTemplateService, TurbineUIService, TurbineUniqueIdService, TurbineYaafiComponentService

    public abstract class TurbineBaseService

extends BaseService

This class provides a `Service` implementation that Services used in Turbine are required to extend. The functionality provided in addition to `BaseService` functionality is recognizing objects used in early initialization of `Services` in Turbine, and passing them to appropriate convenience methods. These methods should be overriden to provide desired initialization functionality.

Note!
Remember to call `setInit(true)` after successful initialization.

Note!
If you need to use another `Service` inside your early initialization, remember to request initialization of that `Service` before using it:

     getServiceBroker().initClass("OtherService",data);
     OtherService service =
             (OtherService)getServiceBroker().getService("OtherService");

Version:
  $Id: TurbineBaseService.java 1078552 2011-03-06 19:58:46Z tv $
Author:
  Greg Ritter, Brett McLaughlin, Kevin Burton, Rafal Krzewski, Jon S. Stevens, Jason van Zyl, Peter Courcoux

Field Summary

Fields inherited from class org.apache.turbine.services.BaseService
`configuration, name, serviceBroker`

Fields inherited from class org.apache.turbine.services.BaseInitable
`initableBroker, isInitialized`

Fields inherited from interface org.apache.turbine.services.Service
`SERVICE_NAME`

Constructor Summary
`TurbineBaseService()`

Method Summary
`void` | `init()` Performs late initialization.
`void` | `init(Object data)` Performs early initialization.
`void` | `init(PipelineData data)` Performs early initialization.
`void` | `init(RunData data)` Deprecated. Use the PipelineData version instead.
`void` | `shutdown()` Returns to uninitialized state.

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.Initable
`getInit, setInitableBroker`

Constructor Detail

### TurbineBaseService

    public TurbineBaseService()

Method Detail

### init

    public void init(Object data)
              throws InitializationException

  Performs early initialization. Overrides init() method in BaseService to detect objects used in Turbine's Service initialization and pass them to apropriate init() methods.

  Specified by:
    `init` in interface `Initable`
  Overrides:
    `init` in class `BaseInitable`
  Parameters:
    `data` - An Object to use for initialization activities.
  Throws:
    `InitializationException` - if initialization of this class was not successful.

### init

    @Deprecated
    public void init(RunData data)
              throws InitializationException

  Deprecated. Use the PipelineData version instead.

  Performs early initialization.

  Parameters:
    `data` - An RunData to use for initialization activities.
  Throws:
    `InitializationException` - if initialization of this class was not successful.

### init

    public void init(PipelineData data)
              throws InitializationException

  Performs early initialization.

  Parameters:
    `data` - A PipelineData to use for initialization activities.
  Throws:
    `InitializationException` - if initialization of this class was not successful.

### init

    public void init()
              throws InitializationException

  Performs late initialization. If your class relies on early initialization, and the object it expects was not received, you can use late initialization to throw an exception and complain.

  Specified by:
    `init` in interface `Initable`
  Overrides:
    `init` in class `BaseInitable`
  Throws:
    `InitializationException,` - if initialization of this class was not successful.
    `InitializationException` - Initialization of this class was not successful.

### shutdown

    public void shutdown()

  Returns to uninitialized state. You can use this method to release resources thet your Service allocated when Turbine shuts down.

  Specified by:
    `shutdown` in interface `Initable`
  Overrides:
    `shutdown` in class `BaseInitable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.