Class ResourceMethodDispatcherFactory
- java.lang.Object
-
- org.glassfish.jersey.server.model.internal.ResourceMethodDispatcherFactory
-
- All Implemented Interfaces:
ResourceMethodDispatcher.Provider
@Singleton public final class ResourceMethodDispatcherFactory extends Object implements ResourceMethodDispatcher.Provider
A resource method dispatcher provider factory.This class is used by
ResourceMethodInvokerto create aResourceMethodDispatcher.Providerinstance that will be used to provide aResourceMethodDispatcherinstances for all resource method invocations.JAX-RS resource methods are invoked by
resource method invoker. Whenever a new incoming request has been routed to a resource method and the method is being invoked by the resource method invoker, the invoker consults a registeredResourceMethodDispatcher.Providerinstance to retrieve aResourceMethodDispatcherthat will be ultimately used to dispatch the resource method invocation. This mechanism is useful for implementing any resource method interception logic.- Author:
- Paul Sandoz, Marek Potociar
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceMethodDispatchercreate(Invocable resourceMethod, InvocationHandler handler, org.glassfish.jersey.server.internal.inject.ConfiguredValidator validator)Create aresource method dispatcherfor a giveninvocable resource method.
-
-
-
Method Detail
-
create
public ResourceMethodDispatcher create(Invocable resourceMethod, InvocationHandler handler, org.glassfish.jersey.server.internal.inject.ConfiguredValidator validator)
Description copied from interface:ResourceMethodDispatcher.ProviderCreate aresource method dispatcherfor 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 handlerwhenever thedispatch(...)method is called on that dispatcher instance.- Specified by:
createin interfaceResourceMethodDispatcher.Provider- Parameters:
resourceMethod- 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
nullif it could not be created for the given resource method.
-
-