Interface ResourceMethodDispatcher.Provider

All Known Implementing Classes:
Enclosing interface:

public static interface ResourceMethodDispatcher.Provider
Provider interface for creating a resource method dispatcher instances. A provider examines the model of the Web resource method and determines if an invoker can be created for that Web resource method.

Multiple providers can specify the support for different Web resource method patterns, ranging from simple patterns (such as void return and input parameters) to complex patterns that take type URI and query arguments and HTTP request headers as typed parameters.

Resource method dispatcher provider implementations can be registered in Jersey application by supplying a custom HK2 Binder that binds the custom service implementation(s) to the ResourceMethodDispatcher.Provider contract.

Paul Sandoz, Marek Potociar
  • Method Details

    • create

      Create a resource method dispatcher for a given invocable resource method.

      If the provider supports the invocable resource method, it will return a new non-null dispatcher instance configured to invoke the supplied invocable resource method via the provided invocation handler whenever the dispatch(...) method is called on that dispatcher instance.

      method - the invocable resource method.
      handler - invocation handler to be used for the resource method invocation.
      validator - configured validator to be used for validation during resource method invocation
      the resource method dispatcher, or null if it could not be created for the given resource method.