Interface ApiResourceProviderFactory


  • @ConsumerType
    public interface ApiResourceProviderFactory
    The ApiResourceProviderFactory defines the service interface to get and create ApiResourceProviders's dynamically on a per usage base.

    Implementations of this interface must be defined as OSGi services and define a service registration property PROVIDER_TYPE. The ApiResourceProviderFactory will be selected by the value returned by getContextPath().

    • Field Detail

      • PROVIDER_TYPE

        static final java.lang.String PROVIDER_TYPE
        The name of the service registration property containing the API type this provider is registered with (value is "provider.type").
        See Also:
        Constant Field Values
    • Method Detail

      • getContextPath

        java.lang.String getContextPath()
        Returns the context path of the ApiResourceProviderFactory under which the ApiResourceProvider will be responsible to return resources.
        Returns:
        The context path this ApiResourceProviderFactory is responsible for
      • getResourceProvider

        ApiResourceProvider getResourceProvider​(java.lang.String rootContextPath)
        Returns a new ApiResourceProvider instance.
        Parameters:
        rootContextPath - The root context path of the default API servlet. By default the value is /api.
        Returns:
        A ApiResourceProvider.