Class ResourceMethodInvocationHandlerFactory
- java.lang.Object
-
- org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory
-
- All Implemented Interfaces:
ResourceMethodInvocationHandlerProvider
@Singleton public final class ResourceMethodInvocationHandlerFactory extends java.lang.Object implements ResourceMethodInvocationHandlerProvider
An injectableresource method invocation handler providerfactory. When invoked, the factory iterates over the registered customresource method invocation handler providersinvoking theircreatePatternFor(...)methods and returns the first non-nullinvocation handlerinstance retrieved from the providers. If no custom providers are available, or if none of the providers returns a non-null invocation handler, in such case a default invocation handler provided by the factory is returned.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.reflect.InvocationHandlerDEFAULT_HANDLERprivate static java.util.logging.LoggerLOGGERprivate LazyValue<java.util.Set<ResourceMethodInvocationHandlerProvider>>providers
-
Constructor Summary
Constructors Constructor Description ResourceMethodInvocationHandlerFactory(InjectionManager injectionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.InvocationHandlercreate(Invocable resourceMethod)Get the invocation handler for the invocable resource method.
-
-
-
Field Detail
-
DEFAULT_HANDLER
private static final java.lang.reflect.InvocationHandler DEFAULT_HANDLER
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
providers
private final LazyValue<java.util.Set<ResourceMethodInvocationHandlerProvider>> providers
-
-
Constructor Detail
-
ResourceMethodInvocationHandlerFactory
ResourceMethodInvocationHandlerFactory(InjectionManager injectionManager)
-
-
Method Detail
-
create
public java.lang.reflect.InvocationHandler create(Invocable resourceMethod)
Description copied from interface:ResourceMethodInvocationHandlerProviderGet the invocation handler for the invocable resource method. May returnnullin case the method is not supported by the provider for whatever reason.- Specified by:
createin interfaceResourceMethodInvocationHandlerProvider- Parameters:
resourceMethod- invocable resource method.- Returns:
- invocation handler for the invocable resource method.
-
-