@Singleton public final class ResourceMethodInvocationHandlerFactory extends java.lang.Object implements ResourceMethodInvocationHandlerProvider
resource method
invocation handler provider factory.
When invoked, the factory iterates over the registered custom resource method invocation handler providers invoking their
createPatternFor(...)
methods and returns the first non-null invocation handler instance 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.| Modifier and Type | Field and Description |
|---|---|
private static java.lang.reflect.InvocationHandler |
DEFAULT_HANDLER |
private static java.util.logging.Logger |
LOGGER |
private java.util.Set<ResourceMethodInvocationHandlerProvider> |
providers |
| Constructor and Description |
|---|
ResourceMethodInvocationHandlerFactory(org.glassfish.hk2.api.ServiceLocator locator) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.reflect.InvocationHandler |
create(Invocable resourceMethod)
Get the invocation handler for the invocable resource method.
|
private static final java.lang.reflect.InvocationHandler DEFAULT_HANDLER
private static final java.util.logging.Logger LOGGER
private final java.util.Set<ResourceMethodInvocationHandlerProvider> providers
@Inject ResourceMethodInvocationHandlerFactory(org.glassfish.hk2.api.ServiceLocator locator)
public java.lang.reflect.InvocationHandler create(Invocable resourceMethod)
ResourceMethodInvocationHandlerProvidernull in case the method is not supported by the provider for whatever
reason.create in interface ResourceMethodInvocationHandlerProviderresourceMethod - invocable resource method.