Interface ResourceMethodDispatcher.Provider
-
- All Known Implementing Classes:
ResourceMethodDispatcherFactory
- Enclosing interface:
- ResourceMethodDispatcher
public static interface ResourceMethodDispatcher.Provider
Provider interface for creating aresource 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 theResourceMethodDispatcher.Provider
contract.- Author:
- Paul Sandoz, Marek Potociar
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceMethodDispatcher
create(Invocable method, InvocationHandler handler, org.glassfish.jersey.server.internal.inject.ConfiguredValidator validator)
Create aresource method dispatcher
for a giveninvocable resource method
.
-
-
-
Method Detail
-
create
ResourceMethodDispatcher create(Invocable method, InvocationHandler handler, org.glassfish.jersey.server.internal.inject.ConfiguredValidator validator)
Create aresource method dispatcher
for a giveninvocable 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 providedinvocation handler
whenever thedispatch(...)
method is called on that dispatcher instance.- Parameters:
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- Returns:
- the resource method dispatcher, or
null
if it could not be created for the given resource method.
-
-