org.apache.turbine.services

## Interface TurbineServiceProvider

- All Known Subinterfaces:
    AvalonComponentService
  All Known Implementing Classes:
    TurbineYaafiComponentService

      public interface TurbineServiceProvider

  Interface for telling Turbine that the implementation class is an external service provider therefore can be used for looking up services not found by the Turbine implementation. It is assumed that the referenced service container handles the complete lifecycle of its services.
  Author:
    Siegfried Goeschl

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `exists(String roleName)` Is the service known to the service container?
    `Object` | `get(String roleName)` Returns an instance of the requested service.
    `void` | `release(Object component)` Releases the instance you got before.

- - ### Method Detail

    - #### get

          Object get(String roleName)
                     throws InstantiationException

      Returns an instance of the requested service. If the given service is not available/found we throw a RuntimeException since this is less intrusive.
      Parameters:
        `roleName` - the name of the requested service
      Returns:
        an instance of the service
      Throws:
        `InstantiationException` - the service could not be instantiated

    - #### release

          void release(Object component)

      Releases the instance you got before. This is only really required when not working with service singletons.
      Parameters:
        `component` - the component to release

    - #### exists

          boolean exists(String roleName)

      Is the service known to the service container?
      Parameters:
        `roleName` - the name of the requested service
      Returns:
        true if the service is known to the provider

Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.