org.apache.tapestry5.ioc

## Interface ServiceLifecycle2

- All Superinterfaces:
    ServiceLifecycle
  All Known Implementing Classes:
    SingletonServiceLifecycle

      public interface ServiceLifecycle2
      extends ServiceLifecycle

  Extension to `ServiceLifecycle` that adds an additional method.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `requiresProxy()` If true, then lifecycle requires a proxy, meaning it is only usable with services that properly define a service interface.

    - ### Methods inherited from interface org.apache.tapestry5.ioc.ServiceLifecycle

      `createService, isSingleton`

- - ### Method Detail

    - #### requiresProxy

          boolean requiresProxy()

      If true, then lifecycle requires a proxy, meaning it is only usable with services that properly define a service interface. The default (singleton) scope does not require a proxy, but most other service scopes do. The default (when wrapping a `ServiceLifecycle` as a `ServiceLifecycle2` is to return true.
      Returns:
        true if proxying is necessary, false otherwise

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.