Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ServiceRegistry

Hierarchy

  • ServiceRegistry

Implemented by

Index

Methods

Methods

add

  • Add a new service implementation to the registry. Only one service may be bound to a given definition.

    When a new service is added, any listeners will be notified.

    throws

    an error if another service is already bound to the same definition.

    Type parameters

    • Request

    • Response

    Parameters

    • definition: ServiceDefinition<Request, Response>

      the service definition

    • service: Service<Request, Response>

      the service implementation

    Returns void

addListener

  • Add a listener, to be notified whenever a new service implementation is added.

    When a listener is added, it will immediately be called with all existing services in the registry.

    Listeners are used to add services to the ServiceAdapter

    Parameters

    Returns void