Interface ServiceRegistry

All Known Subinterfaces:
ServiceContainer
All Known Implementing Classes:
DelegatingServiceContainer, DelegatingServiceRegistry

public interface ServiceRegistry
A service registry. Registries can return services by name, or get a collection of service names.
Author:
Flavia Rainone, David M. Lloyd
  • Method Details

    • getRequiredService

      ServiceController<?> getRequiredService(ServiceName serviceName) throws ServiceNotFoundException
      Get a service, throwing an exception if it is not found.
      Parameters:
      serviceName - the service name
      Returns:
      the service controller for the corresponding service
      Throws:
      ServiceNotFoundException - if the service is not present in the registry
    • getService

      ServiceController<?> getService(ServiceName serviceName)
      Get a service, returning null if it is not found.
      Parameters:
      serviceName - the service name
      Returns:
      the service controller for the corresponding service, or null if it is not found
    • getServiceNames

      List<ServiceName> getServiceNames()
      Get a list of service names installed in this registry.
      Returns:
      the list