org.apache.tapestry5.ioc.internal

## Interface InternalRegistry

- All Superinterfaces:
    ObjectLocator, OperationTracker, Registry, RegistryShutdownHub
  All Known Implementing Classes:
    RegistryImpl

      public interface InternalRegistry
      extends Registry, RegistryShutdownHub, OperationTracker

  Internal view of the module registry, adding additional methods needed by modules.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `expandSymbols(String input)` Given an input string that may contain symbols, returns the string with any and all symbols fully expanded.
    `List<ServiceAdvisor>` | `findAdvisorsForService(ServiceDef3 serviceDef)` Searches for advisors for a particular service, returning them in order of application.
    `List<ServiceDecorator>` | `findDecoratorsForService(ServiceDef3 serviceDef)` Searches for decorators for a particular service.
    `<K,V> Map<K,V>` | `getMappedConfiguration(ServiceDef3 serviceDef, Class<K> keyType, Class<V> valueType)` Builds up a map of key/value pairs by invoking service contribution methods that target the service (from any module, unless the service is private).
    `Set<Class>` | `getMarkerAnnotations()` Returns a Set of Annotation classes that are used as service markers.
    `<T> T` | `getObject(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator, Module localModule)` As with `ObjectLocator.getObject(Class, org.apache.tapestry5.ioc.AnnotationProvider)`, but handles the `Local` annotation.
    `<T> List<T>` | `getOrderedConfiguration(ServiceDef3 serviceDef, Class<T> valueType)` Builds up an ordered collection by invoking service contributor methods that target the service (from any module, unless the service is private).
    `ServiceLifecycle2` | `getServiceLifecycle(String scope)` Returns a service lifecycle by service scope name.
    `org.slf4j.Logger` | `getServiceLogger(String serviceId)` Returns a logger for the service, which consists of the Module's `log name` suffixed with a period and the service id.
    `<T> Collection<T>` | `getUnorderedConfiguration(ServiceDef3 serviceDef, Class<T> valueType)` Builds up an unordered collection by invoking service contributor methods that target the service (from any module, unless the service is private).
    `<T> T` | `proxy(Class<T> interfaceClass, Class<? extends T> implementationClass, ObjectLocator locator)` Creates a just-in-time (and possibly, live reloading) proxy for the indicated class and interface, using the provided locator to autobuild the implementationClass (when necessary).

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

      `cleanupThread, performRegistryStartup, shutdown`

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

      `autobuild, autobuild, getObject, getService, getService, getService, proxy`

    - ### Methods inherited from interface org.apache.tapestry5.ioc.services.RegistryShutdownHub

      `addRegistryShutdownListener, addRegistryShutdownListener, addRegistryWillShutdownListener`

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

      `invoke, perform, run`

- - ### Method Detail

    - #### getObject

          <T> T getObject(Class<T> objectType,
                          AnnotationProvider annotationProvider,
                          ObjectLocator locator,
                          Module localModule)

      As with `ObjectLocator.getObject(Class, org.apache.tapestry5.ioc.AnnotationProvider)`, but handles the `Local` annotation.
      Parameters:
        `objectType` - type of object o be injected
        `annotationProvider` - access to annotations at point of injection
        `locator` - used to resolve any subsequent injections
        `localModule` - module to limit services to, if Local annotaton present
      Returns:
        the service or object

    - #### getServiceLifecycle

          ServiceLifecycle2 getServiceLifecycle(String scope)

      Returns a service lifecycle by service scope name.
      Parameters:
        `scope` - the name of the service scope (case insensitive)
      Returns:
        the lifecycle corresponding to the scope
      Throws:
        `RuntimeException` - if the lifecycle name does not match a known lifecycle

    - #### findDecoratorsForService

          List<ServiceDecorator> findDecoratorsForService(ServiceDef3 serviceDef)

      Searches for decorators for a particular service. The resulting `DecoratorDef` s are ordered, then converted into `ServiceDecorator`s.

    - #### findAdvisorsForService

          List<ServiceAdvisor> findAdvisorsForService(ServiceDef3 serviceDef)

      Searches for advisors for a particular service, returning them in order of application.
      Since:
        5.1.0.0

    - #### getUnorderedConfiguration

          <T> Collection<T> getUnorderedConfiguration(ServiceDef3 serviceDef,
                                                      Class<T> valueType)

      Builds up an unordered collection by invoking service contributor methods that target the service (from any module, unless the service is private).
      Type Parameters:
        `T` -
      Parameters:
        `serviceDef` - defines the service for which configuration data is being assembled
        `valueType` - identifies the type of object allowed into the collection
      Returns:
        the final collection

    - #### getOrderedConfiguration

          <T> List<T> getOrderedConfiguration(ServiceDef3 serviceDef,
                                              Class<T> valueType)

      Builds up an ordered collection by invoking service contributor methods that target the service (from any module, unless the service is private). Once all values have been added (each with an id, and pre/post constraints), the values are ordered, null values dropped, and the final sorted list is returned.
      Type Parameters:
        `T` -
      Parameters:
        `serviceDef` - defines the service for which configuration data is being assembled
        `valueType` - identifies the type of object allowed into the collection
      Returns:
        the final ordered list

    - #### getMappedConfiguration

          <K,V> Map<K,V> getMappedConfiguration(ServiceDef3 serviceDef,
                                                Class<K> keyType,
                                                Class<V> valueType)

      Builds up a map of key/value pairs by invoking service contribution methods that target the service (from any module, unless the service is private). Values and keys may not be null. Invalid values (keys or values that are the wrong type, or duplicate keys) result in warnings and are ignored.
      Type Parameters:
        `K` -
        `V` -
      Parameters:
        `serviceDef` - defines the service for which configuration data is being assembled
        `keyType` - identifies the type of key object allowed into the map
        `valueType` - identifies the type of value object allowed into the map
      Returns:
        the final ordered list

    - #### expandSymbols

          String expandSymbols(String input)

      Given an input string that may contain symbols, returns the string with any and all symbols fully expanded.
      Parameters:
        `input` -
      Returns:
        expanded input

    - #### getServiceLogger

          org.slf4j.Logger getServiceLogger(String serviceId)

      Returns a logger for the service, which consists of the Module's `log name` suffixed with a period and the service id.
      Parameters:
        `serviceId` -
      Returns:
        the logger for the service

    - #### proxy

          <T> T proxy(Class<T> interfaceClass,
                      Class<? extends T> implementationClass,
                      ObjectLocator locator)

      Creates a just-in-time (and possibly, live reloading) proxy for the indicated class and interface, using the provided locator to autobuild the implementationClass (when necessary).
      Since:
        5.2.0

    - #### getMarkerAnnotations

          Set<Class> getMarkerAnnotations()

      Returns a Set of Annotation classes that are used as service markers.
      Since:
        5.2.0

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