Interface IdServiceDirectoryType

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
IdServiceDirectory

public interface IdServiceDirectoryType extends Closeable
The type of service directories.
  • Method Details

    • optionalService

      <T extends IdServiceType> Optional<T> optionalService(Class<T> clazz)
      Get an optional reference to the given service.
      Type Parameters:
      T - The service type
      Parameters:
      clazz - The service interface
      Returns:
      A service reference, if a service exists
    • requireService

      <T extends IdServiceType> T requireService(Class<T> clazz) throws IdServiceException
      Get a required reference to the given service.
      Type Parameters:
      T - The service type
      Parameters:
      clazz - The service interface
      Returns:
      A service reference
      Throws:
      IdServiceException - If no service exists
    • optionalServices

      <T extends IdServiceType> List<? extends T> optionalServices(Class<T> clazz) throws IdServiceException
      Get references to the given services.
      Type Parameters:
      T - The service type
      Parameters:
      clazz - The service interface
      Returns:
      A service list, if services exist
      Throws:
      IdServiceException - If no required
    • services

      List<IdServiceType> services()
      Returns:
      A read-only list of all the services present