Interface Binding

All Known Implementing Classes:
EmptyBinding

public interface Binding
A binding instance, if available at runtime, will be expected to provide a plan for all service provider's injection points.

Implementations of this contract are normally code generated, although then can be programmatically written by the developer for special cases.

Binding instances MUST NOT have injection points.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TypeName
    Type name of this interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    For each service in this application, bind services that satisfy its injection points.
    void
    Register all services with the configuration.
    Name of this application binding.
  • Field Details

    • TYPE

      static final TypeName TYPE
      Type name of this interface.
  • Method Details

    • name

      String name()
      Name of this application binding.
      Returns:
      binding name
    • binding

      void binding(DependencyPlanBinder binder)
      For each service in this application, bind services that satisfy its injection points.
      Parameters:
      binder - the binder used to register the service provider dependency injection plan
    • configure

      void configure(ServiceRegistryConfig.Builder builder)
      Register all services with the configuration. When application binding is available to the registry, automatic discovery of services is disabled, and only services registered in this method will be used by the registry.

      The services registered in this method must be aligned with binding(DependencyPlanBinder), as otherwise inconsistent registry would be created.

      Parameters:
      builder - configuration builder to register service descriptors