public class ResourceMethod extends Object implements ResourceInvoker, InterceptorRegistryListener
Modifier and Type | Field and Description |
---|---|
protected MediaType[] |
consumes |
protected Type |
genericReturnType |
protected Set<String> |
httpMethods |
protected InjectorFactory |
injector |
protected Method |
method |
protected Consumes |
methodConsumes |
protected MethodInjector |
methodInjector |
protected PostProcessInterceptor[] |
postProcessInterceptors |
protected List<WeightedMediaType> |
preferredConsumes |
protected List<WeightedMediaType> |
preferredProduces |
protected PreProcessInterceptor[] |
preProcessInterceptors |
protected MediaType[] |
produces |
protected ResteasyProviderFactory |
providerFactory |
protected ResourceFactory |
resource |
protected Class<?> |
resourceClass |
protected ConcurrentHashMap<String,AtomicLong> |
stats |
protected MessageBodyWriterInterceptor[] |
writerInterceptors |
Constructor and Description |
---|
ResourceMethod(Class<?> clazz,
Method method,
InjectorFactory injector,
ResourceFactory resource,
ResteasyProviderFactory providerFactory,
Set<String> httpMethods) |
protected MediaType[] produces
protected MediaType[] consumes
protected Consumes methodConsumes
protected List<WeightedMediaType> preferredProduces
protected List<WeightedMediaType> preferredConsumes
protected MethodInjector methodInjector
protected InjectorFactory injector
protected ResourceFactory resource
protected ResteasyProviderFactory providerFactory
protected Method method
protected Class<?> resourceClass
protected PreProcessInterceptor[] preProcessInterceptors
protected PostProcessInterceptor[] postProcessInterceptors
protected MessageBodyWriterInterceptor[] writerInterceptors
protected ConcurrentHashMap<String,AtomicLong> stats
protected Type genericReturnType
public ResourceMethod(Class<?> clazz, Method method, InjectorFactory injector, ResourceFactory resource, ResteasyProviderFactory providerFactory, Set<String> httpMethods)
public void cleanup()
public void registryUpdated(InterceptorRegistry registry)
registryUpdated
in interface InterceptorRegistryListener
protected void incrementMethodCount(String httpMethod)
public Map<String,AtomicLong> getStats()
public Class<?> getResourceClass()
public List<WeightedMediaType> getPreferredProduces()
public List<WeightedMediaType> getPreferredConsumes()
public Method getMethod()
public ServerResponse invoke(HttpRequest request, HttpResponse response)
invoke
in interface ResourceInvoker
public ServerResponse invoke(HttpRequest request, HttpResponse response, Object target)
invoke
in interface ResourceInvoker
protected ServerResponse invokeOnTarget(HttpRequest request, HttpResponse response, Object target)
protected ServerResponse prepareResponse(ServerResponse serverResponse)
public boolean doesConsume(MediaType contentType)
public boolean doesConsume(MediaType contentType, boolean ignoreParameters)
public MediaType resolveContentType(HttpRequest in, Object entity)
protected MediaType resolveContentTypeByAccept(List<MediaType> accepts, Object entity)
public MediaType[] getProduces()
public MediaType[] getConsumes()
Copyright © 2018 JBoss by Red Hat. All rights reserved.