Interface InternalRegistry

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

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

    • getObject

      <T> T getObject(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator, Module localModule)
      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

      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

      Searches for decorators for a particular service. The resulting DecoratorDef s are ordered, then converted into ServiceDecorators.
    • findAdvisorsForService

      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

      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

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