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
Interface Initable

All Known Subinterfaces:
  AssemblerBrokerService, AvalonComponentService, JsonRpcService, JspService, NamingService, PullService, RunDataService, ScheduleService, SecurityService, Service, ServletService, SessionService, TemplateService, UIService, UniqueIdService, VelocityService

All Known Implementing Classes:
  BaseInitable, BaseSecurityService, BaseService, BaseTemplateEngineService, BaseUnicastRemoteService, LDAPSecurityService, TorqueSecurityService, TurbineAssemblerBrokerService, TurbineAvalonComponentService, TurbineBaseService, TurbineJsonRpcService, TurbineJspService, TurbineNamingService, TurbineNonPersistentSchedulerService, TurbinePullService, TurbineRunDataService, TurbineSchedulerService, TurbineServletService, TurbineSessionService, TurbineTemplateService, TurbineUIService, TurbineUniqueIdService, TurbineVelocityService, TurbineYaafiComponentService

    public interface Initable

Classes that implement this interface need initialization before they can work. These classes rely also on an `InitableBroker` that ensures that there is only one instance of the class in the system, and handles dependencies between `Initables`.

Version:
  $Id: Initable.java 615328 2008-01-25 20:25:05Z tv $
Author:
  Kevin Burton, Rafal Krzewski

Method Summary
`boolean` | `getInit()` Returns initialization status of an Initable.
`void` | `init()` Performs late initialization of an Initable.
`void` | `init(Object data)` Performs early initailization of an Initable During the startup of the system, different objects may be passed to your class using this method.
`void` | `setInitableBroker(InitableBroker broker)` Provides an Initable with a reference to the InitableBroker that instantiated this object, so that it can access other Initables.
`void` | `shutdown()` Returns an `Initable` to an uninitialized state.

Method Detail

### setInitableBroker

    void setInitableBroker(InitableBroker broker)

  Provides an Initable with a reference to the InitableBroker that instantiated this object, so that it can access other Initables.

  Parameters:
    `broker` - The InitableBroker that instantiated this object.

### init

    void init(Object data)
              throws InitializationException

  Performs early initailization of an Initable During the startup of the system, different objects may be passed to your class using this method. It should ignore any objects that it doesn't need or understand. After the class changes its internal state so that getInit() returns true, this method will be called no more, and late initialization will not be performed. 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.

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

### init

    void init()
              throws InitializationException

  Performs late initialization of an Initable. When your class is being requested from an InitableBroker, it will call getInit(), and if it returns false, this method will be invoked.

  Throws:
    `InitializationException` - if initialization of this class was not successful.

### shutdown

    void shutdown()

  Returns an `Initable` to an uninitialized state.

  This method must release all resources allocated by the `Initable` implementation, and resetting its internal state. You may chose to implement this operation or not. If you support this operation, getInit() should return false after successful shutdown of the service.

### getInit

    boolean getInit()

  Returns initialization status of an Initable.

  Returns:
    Initialization status of an Initable.

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.