Interface ServiceLocator


public interface ServiceLocator
Locator to look up services while processing a FileBasedUploadFilter. For a generic way of looking up services, please use a ServicesBroker.
Since:
5.2.241103
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    getService(@NotNull Class<T> serviceClass)
    Query a service by its interface class.
    @NotNull Object
    getService(@NotNull String serviceName)
    Query a service by its name.
  • Method Details

    • getService

      @NotNull @NotNull Object getService(@NotNull @NotNull String serviceName) throws ServiceNotFoundException
      Query a service by its name.
      Parameters:
      serviceName - The name of the service to look up, must not be null.
      Returns:
      A service instance, never null.
      Throws:
      ServiceNotFoundException - If no appropriate service was found.
      Since:
      5.2.241103
    • getService

      @NotNull <T> T getService(@NotNull @NotNull Class<T> serviceClass) throws ServiceNotFoundException
      Query a service by its interface class.
      Parameters:
      serviceClass - The class of the service to look up, must not be null.
      Returns:
      A service instance, never null.
      Throws:
      ServiceNotFoundException - If no appropriate service was found.
      Since:
      5.2.241103