Class AbstractValueParamProvider

java.lang.Object
org.glassfish.jersey.server.internal.inject.AbstractValueParamProvider
All Implemented Interfaces:
ValueParamProvider
Direct Known Subclasses:
SseEventSinkValueParamProvider

public abstract class AbstractValueParamProvider extends Object implements ValueParamProvider
A parameter value provider that provides parameter value factories which are using MultivaluedParameterExtractorProvider to extract parameter values from the supplied multivalued parameter map.
Author:
Paul Sandoz, Marek Potociar
  • Constructor Details

    • AbstractValueParamProvider

      protected AbstractValueParamProvider(jakarta.inject.Provider<MultivaluedParameterExtractorProvider> mpep, Parameter.Source... compatibleSources)
      Initialize the provider.
      Parameters:
      mpep - multivalued map parameter extractor provider.
      compatibleSources - compatible parameter sources.
  • Method Details

    • get

      protected final MultivaluedParameterExtractor<?> get(Parameter parameter)
      Get a parameter extractor. The extractor returned from this method will use the default value set on the parameter, in case the parameter is not found in the supplied multivalued parameter map.
      Parameters:
      parameter - parameter supported by the returned extractor.
      Returns:
      extractor supporting the parameter. The returned instance ignores any default values set on the parameter.
    • createValueProvider

      protected abstract Function<ContainerRequest,?> createValueProvider(Parameter parameter)
      Create a value provider for the parameter. May return null in case the parameter is not supported by the value provider.
      Parameters:
      parameter - parameter requesting the value provider instance.
      Returns:
      parameter value supplier. Returns null if parameter is not supported.
    • getValueProvider

      public final Function<ContainerRequest,?> getValueProvider(Parameter parameter)
      Get an injected value provider for the parameter. May return null in case the parameter is not supported by the value provider.
      Specified by:
      getValueProvider in interface ValueParamProvider
      Parameters:
      parameter - parameter requesting the value provider instance.
      Returns:
      injected parameter value supplier. Returns null if parameter is not supported.
    • getPriority

      public ValueParamProvider.PriorityType getPriority()
      Description copied from interface: ValueParamProvider
      Gets the priority of this provider.
      Specified by:
      getPriority in interface ValueParamProvider
      Returns:
      the priority of this provider.
      See Also: