org.apache.tapestry5.ioc.internal

## Interface Module

- All Superinterfaces:
    ModuleBuilderSource
  All Known Implementing Classes:
    ModuleImpl

      public interface Module
      extends ModuleBuilderSource

  A module within the Tapestry IoC registry. Each Module is constructed around a corresponding module builder instance; the methods and annotations of that instance define the services provided by the module.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `collectEagerLoadServices(Collection<EagerLoadServiceProxy> proxies)` Locates services with the `EagerLoad` annotation and generates proxies for them, then adds them to the proxies list for instantiation.
    `Set<DecoratorDef>` | `findMatchingDecoratorDefs(ServiceDef serviceDef)` Iterates over any decorator definitions defined by the module and returns those that apply to the provided service definition.
    `Set<AdvisorDef>` | `findMatchingServiceAdvisors(ServiceDef serviceDef)` Iterates over any advisor definitions defined by the module and returns those that apply to the provided service definition.
    `Collection<String>` | `findServiceIdsForInterface(Class serviceInterface)` Locates the ids of all services that implement the provided service interface, or whose service interface is assignable to the provided service interface (is a super-class or super-interface).
    `Set<ContributionDef2>` | `getContributorDefsForService(ServiceDef serviceDef)` Finds any contributions that are targeted at the indicated service.
    `String` | `getLoggerName()` Returns the name used to obtain a logger for the module.
    `<T> T` | `getService(String serviceId, Class<T> serviceInterface)` Locates a service given a service id and the corresponding service interface type.
    `ServiceDef3` | `getServiceDef(String serviceId)` Returns the service definition for the given service id.

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

      `getModuleBuilder`

- - ### Method Detail

    - #### getService

          <T> T getService(String serviceId,
                           Class<T> serviceInterface)

      Locates a service given a service id and the corresponding service interface type.
      Type Parameters:
        `T` -
      Parameters:
        `serviceId` - identifies the service to access
        `serviceInterface` - the interface the service implements
      Returns:
        the service's proxy
      Throws:
        `RuntimeException` - if there is an error instantiating the service proxy

    - #### findServiceIdsForInterface

          Collection<String> findServiceIdsForInterface(Class serviceInterface)

      Locates the ids of all services that implement the provided service interface, or whose service interface is assignable to the provided service interface (is a super-class or super-interface).
      Parameters:
        `serviceInterface` - the interface to search for
      Returns:
        a collection of service ids

    - #### findMatchingDecoratorDefs

          Set<DecoratorDef> findMatchingDecoratorDefs(ServiceDef serviceDef)

      Iterates over any decorator definitions defined by the module and returns those that apply to the provided service definition.
      Parameters:
        `serviceDef` - for which decorators are being assembled
      Returns:
        set of decorators, possibly empty (but not null)

    - #### findMatchingServiceAdvisors

          Set<AdvisorDef> findMatchingServiceAdvisors(ServiceDef serviceDef)

      Iterates over any advisor definitions defined by the module and returns those that apply to the provided service definition.
      Parameters:
        `serviceDef` - for which advisors are being assembled
      Returns:
        set of advisors, possibly empty but not null
      Since:
        5.1.0.0

    - #### getContributorDefsForService

          Set<ContributionDef2> getContributorDefsForService(ServiceDef serviceDef)

      Finds any contributions that are targeted at the indicated service.

    - #### collectEagerLoadServices

          void collectEagerLoadServices(Collection<EagerLoadServiceProxy> proxies)

      Locates services with the `EagerLoad` annotation and generates proxies for them, then adds them to the proxies list for instantiation.
      Parameters:
        `proxies` - collection of proxies to which any eager load services in the module should be added

    - #### getServiceDef

          ServiceDef3 getServiceDef(String serviceId)

      Returns the service definition for the given service id.
      Parameters:
        `serviceId` - unique id for the service (caseless)
      Returns:
        the service definition or null

    - #### getLoggerName

          String getLoggerName()

      Returns the name used to obtain a logger for the module. Services within the module suffix this with a period and the service id.
      Returns:
        module logger name

5.6.1 - Copyright © 2003-2020 The Apache Software Foundation.