public class ResourceMethodRegistry extends Object implements Registry
| Modifier and Type | Field and Description |
|---|---|
protected ResteasyProviderFactory |
providerFactory |
static String |
REGISTRY_MATCHING_EXCEPTION |
protected ResourceBuilder |
resourceBuilder |
protected RootClassNode |
root |
protected RootNode |
rootNode |
protected StatisticsController |
statisticsController |
protected boolean |
widerMatching |
| Constructor and Description |
|---|
ResourceMethodRegistry(ResteasyProviderFactory providerFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addJndiResource(String jndiName)
Add a JAX-RS endpoint that exists in JNDI.
|
void |
addJndiResource(String jndiName,
ResourceClass resourceClass) |
void |
addJndiResource(String jndiName,
ResourceClass resourceClass,
String basePath) |
void |
addJndiResource(String jndiName,
String basePath)
Add a JAX-RS endpoint that exists in JNDI.
|
void |
addPerRequestResource(Class clazz)
Register a vanilla JAX-RS resource class.
|
void |
addPerRequestResource(Class clazz,
String basePath)
Add a JAX-RS endpoint.
|
void |
addPerRequestResource(ResourceClass clazz) |
void |
addPerRequestResource(ResourceClass clazz,
String basePath) |
void |
addResourceFactory(ResourceFactory ref)
Bind an endpoint ResourceFactory.
|
void |
addResourceFactory(ResourceFactory ref,
String base)
ResourceFactory.getScannableClass() defines what class should be scanned
for JAX-RS annotations.
|
void |
addResourceFactory(ResourceFactory ref,
String base,
Class<?> clazz)
ResourceFactory.getScannableClass() is not used, only the clazz parameter and not any implemented interfaces
of the clazz parameter.
|
void |
addResourceFactory(ResourceFactory ref,
String base,
Class<?>[] classes)
ResourceFactory.getScannableClass() is not used, only the clazz parameter and not any implemented interfaces
of the clazz parameter.
|
void |
addResourceFactory(ResourceFactory rf,
String base,
ResourceClass resourceClass) |
void |
addSingletonResource(Object singleton)
Add a JAX-RS endpoint.
|
void |
addSingletonResource(Object singleton,
ResourceClass resourceClass) |
void |
addSingletonResource(Object singleton,
ResourceClass resourceClass,
String basePath) |
void |
addSingletonResource(Object singleton,
String basePath)
Add a JAX-RS endpoint.
|
void |
checkAmbiguousUri()
Resteasy 2.x does not properly handle sub-resource and sub-resource locator
endpoints with the same uri.
|
Map<String,List<ResourceInvoker>> |
getBounded() |
ResourceInvoker |
getResourceInvoker(HttpRequest request)
Find a resource to invoke on.
|
int |
getSize()
Number of endpoints registered.
|
boolean |
isWiderMatching() |
protected void |
processMethod(ResourceFactory rf,
String base,
ResourceLocator method) |
protected void |
register(ResourceFactory rf,
String base,
ResourceClass resourceClass) |
void |
removeRegistrations(Class clazz)
Find all endpoints reachable by clazz and unregister them.
|
void |
removeRegistrations(Class clazz,
String base) |
void |
removeRegistrations(ResourceClass resourceClass) |
void |
setWiderMatching(boolean widerMatching) |
public static final String REGISTRY_MATCHING_EXCEPTION
protected ResteasyProviderFactory providerFactory
protected RootClassNode root
protected boolean widerMatching
protected RootNode rootNode
protected ResourceBuilder resourceBuilder
protected StatisticsController statisticsController
public ResourceMethodRegistry(ResteasyProviderFactory providerFactory)
public boolean isWiderMatching()
public void setWiderMatching(boolean widerMatching)
public void addPerRequestResource(Class clazz, String basePath)
RegistryaddPerRequestResource in interface Registryclazz - classbasePath - prefix path of resourcepublic void addPerRequestResource(Class clazz)
addPerRequestResource in interface Registryclazz - classpublic void addPerRequestResource(ResourceClass clazz)
addPerRequestResource in interface Registrypublic void addPerRequestResource(ResourceClass clazz, String basePath)
addPerRequestResource in interface Registrypublic void addSingletonResource(Object singleton)
RegistryaddSingletonResource in interface Registrysingleton - resourcepublic void addSingletonResource(Object singleton, String basePath)
RegistryaddSingletonResource in interface Registrysingleton - resourcebasePath - prefix path of resourcepublic void addSingletonResource(Object singleton, ResourceClass resourceClass)
addSingletonResource in interface Registrypublic void addSingletonResource(Object singleton, ResourceClass resourceClass, String basePath)
addSingletonResource in interface Registrypublic void addJndiResource(String jndiName)
RegistryaddJndiResource in interface RegistryjndiName - JNDI namepublic void addJndiResource(String jndiName, String basePath)
RegistryaddJndiResource in interface RegistryjndiName - JNDI namebasePath - prefix path of resourcepublic void addJndiResource(String jndiName, ResourceClass resourceClass)
addJndiResource in interface Registrypublic void addJndiResource(String jndiName, ResourceClass resourceClass, String basePath)
addJndiResource in interface Registrypublic void addResourceFactory(ResourceFactory ref)
addResourceFactory in interface Registryref - resource factorypublic void addResourceFactory(ResourceFactory ref, String base)
addResourceFactory in interface Registryref - resource factorybase - base URI path for any resources provided by the factory, in addition to rootPathpublic void addResourceFactory(ResourceFactory ref, String base, Class<?> clazz)
addResourceFactory in interface Registryref - resource factorybase - base URI path for any resources provided by the factory, in addition to rootPathclazz - specific classpublic void addResourceFactory(ResourceFactory ref, String base, Class<?>[] classes)
addResourceFactory in interface Registryref - resource factorybase - base URI path for any resources provided by the factory, in addition to rootPathclasses - specific classpublic void addResourceFactory(ResourceFactory rf, String base, ResourceClass resourceClass)
addResourceFactory in interface Registryprotected void register(ResourceFactory rf, String base, ResourceClass resourceClass)
public void checkAmbiguousUri()
checkAmbiguousUri in interface Registryprotected void processMethod(ResourceFactory rf, String base, ResourceLocator method)
public void removeRegistrations(Class clazz)
removeRegistrations in interface Registryclazz - classpublic void removeRegistrations(Class clazz, String base)
removeRegistrations in interface Registrypublic void removeRegistrations(ResourceClass resourceClass)
removeRegistrations in interface Registrypublic Map<String,List<ResourceInvoker>> getBounded()
public int getSize()
public ResourceInvoker getResourceInvoker(HttpRequest request)
getResourceInvoker in interface RegistryCopyright © 2021 JBoss by Red Hat. All rights reserved.