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 ServiceBroker

All Known Subinterfaces:
  ServiceManager

All Known Implementing Classes:
  BaseServiceBroker, TurbineServices

    public interface ServiceBroker

Classes that implement this interface can act as a broker for `Service` classes. Functionality that `ServiceBroker` provides in addition to `InitableBroker` functionality includes:

- Maintaining service name to class name mapping, allowing plugable service implementations.
- Providing `Services` with `Properties` based on a system wide configuration mechanism.

Version:
  $Id: ServiceBroker.java 615328 2008-01-25 20:25:05Z tv $
Author:
  Kevin Burton, Rafal Krzewski, Daniel Rall, Henning P. Schmiedehausen

Method Summary
`org.apache.commons.configuration.Configuration` | `getConfiguration(String name)` Returns the configuration of a specific service.
`Object` | `getService(String name)` Returns an instance of requested Service.
`void` | `initService(String name)` Performs early initialization of the specified service.
`boolean` | `isRegistered(String serviceName)` Determines whether a service is registered in the configured `TurbineResources.properties`.
`void` | `shutdownService(String name)` Shutdowns a Service.
`void` | `shutdownServices()` Shutdowns all Services.

Method Detail

### isRegistered

    boolean isRegistered(String serviceName)

  Determines whether a service is registered in the configured `TurbineResources.properties`.

  Parameters:
    `serviceName` - The name of the service whose existance to check.
  Returns:
    Registration predicate for the desired services.

### initService

    void initService(String name)
                     throws InitializationException

  Performs early initialization of the specified service.

  Parameters:
    `name` - The name of the service.
  Throws:
    `InitializationException` - if the service is unknown or can't be initialized.

### shutdownService

    void shutdownService(String name)

  Shutdowns a Service. This method is used to release resources allocated by a Service, and return it to initial (uninitailized) state.

  Parameters:
    `name` - The name of the Service to be uninitialized.

### shutdownServices

    void shutdownServices()

  Shutdowns all Services. This method is used to release resources allocated by Services, and return them to initial (uninitialized) state.

### getService

    Object getService(String name)
                      throws InstantiationException

  Returns an instance of requested Service.

  Parameters:
    `name` - The name of the Service requested.
  Returns:
    An instance of requested Service.
  Throws:
    `InstantiationException` - if the service is unknown or can't be initialized.

### getConfiguration

    org.apache.commons.configuration.Configuration getConfiguration(String name)

  Returns the configuration of a specific service. Services use this method to retrieve their configuration.

  Parameters:
    `name` - The name of the service.
  Returns:
    Configuration of the requested service.

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.