org.jboss.resteasy.core

## Class ResourceMethodInvoker

- java.lang.Object
- - org.jboss.resteasy.core.ResourceMethodInvoker

- All Implemented Interfaces:
    JaxrsInterceptorRegistryListener, ResourceInvoker

      public class ResourceMethodInvoker
      extends Object
      implements ResourceInvoker, JaxrsInterceptorRegistryListener

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `expectsBody`
    `protected InjectorFactory` | `injector`
    `protected boolean` | `isValidatable`
    `protected ResourceMethod` | `method`
    `protected Annotation[]` | `methodAnnotations`
    `protected MethodInjector` | `methodInjector`
    `protected boolean` | `methodIsValidatable`
    `protected ResteasyProviderFactory` | `parentProviderFactory`
    `protected ContainerRequestFilter[]` | `requestFilters`
    `protected ResourceFactory` | `resource`
    `protected ResourceInfo` | `resourceInfo`
    `protected ResteasyProviderFactory` | `resourceMethodProviderFactory`
    `protected ContainerResponseFilter[]` | `responseFilters`
    `protected ConcurrentHashMap<String,AtomicLong>` | `stats`
    `protected GeneralValidator` | `validator`
    `protected WriterInterceptor[]` | `writerInterceptors`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceMethodInvoker(ResourceMethod method, InjectorFactory injector, ResourceFactory resource, ResteasyProviderFactory providerFactory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cleanup()`
    `boolean` | `doesConsume(MediaType contentType)`
    `boolean` | `doesProduce(List<? extends MediaType> accepts)`
    `MediaType[]` | `getConsumes()`
    `Type` | `getGenericReturnType()`
    `Set<String>` | `getHttpMethods()`
    `Method` | `getMethod()`
    `Annotation[]` | `getMethodAnnotations()`
    `MediaType[]` | `getProduces()`
    `ContainerRequestFilter[]` | `getRequestFilters()`
    `Class<?>` | `getResourceClass()`
    `ContainerResponseFilter[]` | `getResponseFilters()`
    `Map<String,AtomicLong>` | `getStats()` Key is httpMethod called
    `WriterInterceptor[]` | `getWriterInterceptors()`
    `protected void` | `incrementMethodCount(String httpMethod)`
    `void` | `initializeAsync(ResteasyAsynchronousResponse asyncResponse)`
    `BuiltResponse` | `invoke(HttpRequest request, HttpResponse response)`
    `BuiltResponse` | `invoke(HttpRequest request, HttpResponse response, Object target)`
    `protected BuiltResponse` | `invokeOnTarget(HttpRequest request, HttpResponse response, Object target)`
    `void` | `registryUpdated(JaxrsInterceptorRegistry registry)`
    `MediaType` | `resolveContentType(HttpRequest in, Object entity)`
    `protected MediaType` | `resolveContentTypeByAccept(List<MediaType> accepts, Object entity)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### methodInjector

          protected MethodInjector methodInjector

    - #### injector

          protected InjectorFactory injector

    - #### resource

          protected ResourceFactory resource

    - #### parentProviderFactory

          protected ResteasyProviderFactory parentProviderFactory

    - #### resourceMethodProviderFactory

          protected ResteasyProviderFactory resourceMethodProviderFactory

    - #### method

          protected ResourceMethod method

    - #### methodAnnotations

          protected Annotation[] methodAnnotations

    - #### requestFilters

          protected ContainerRequestFilter[] requestFilters

    - #### responseFilters

          protected ContainerResponseFilter[] responseFilters

    - #### writerInterceptors

          protected WriterInterceptor[] writerInterceptors

    - #### stats

          protected ConcurrentHashMap<String,AtomicLong> stats

    - #### validator

          protected GeneralValidator validator

    - #### isValidatable

          protected boolean isValidatable

    - #### methodIsValidatable

          protected boolean methodIsValidatable

    - #### resourceInfo

          protected ResourceInfo resourceInfo

    - #### expectsBody

          protected boolean expectsBody

  - ### Constructor Detail

    - #### ResourceMethodInvoker

          public ResourceMethodInvoker(ResourceMethod method,
                               InjectorFactory injector,
                               ResourceFactory resource,
                               ResteasyProviderFactory providerFactory)

  - ### Method Detail

    - #### cleanup

          public void cleanup()

    - #### registryUpdated

          public void registryUpdated(JaxrsInterceptorRegistry registry)

      Specified by:
        `registryUpdated` in interface `JaxrsInterceptorRegistryListener`

    - #### incrementMethodCount

          protected void incrementMethodCount(String httpMethod)

    - #### getStats

          public Map<String,AtomicLong> getStats()

      Key is httpMethod called
      Returns:

    - #### getRequestFilters

          public ContainerRequestFilter[] getRequestFilters()

    - #### getResponseFilters

          public ContainerResponseFilter[] getResponseFilters()

    - #### getWriterInterceptors

          public WriterInterceptor[] getWriterInterceptors()

    - #### getGenericReturnType

          public Type getGenericReturnType()

    - #### getResourceClass

          public Class<?> getResourceClass()

    - #### getMethodAnnotations

          public Annotation[] getMethodAnnotations()

    - #### getMethod

          public Method getMethod()

      Specified by:
        `getMethod` in interface `ResourceInvoker`

    - #### invoke

          public BuiltResponse invoke(HttpRequest request,
                             HttpResponse response)

      Specified by:
        `invoke` in interface `ResourceInvoker`

    - #### invoke

          public BuiltResponse invoke(HttpRequest request,
                             HttpResponse response,
                             Object target)

      Specified by:
        `invoke` in interface `ResourceInvoker`

    - #### invokeOnTarget

          protected BuiltResponse invokeOnTarget(HttpRequest request,
                                     HttpResponse response,
                                     Object target)

    - #### initializeAsync

          public void initializeAsync(ResteasyAsynchronousResponse asyncResponse)

    - #### doesProduce

          public boolean doesProduce(List<? extends MediaType> accepts)

    - #### doesConsume

          public boolean doesConsume(MediaType contentType)

    - #### resolveContentType

          public MediaType resolveContentType(HttpRequest in,
                                     Object entity)

    - #### resolveContentTypeByAccept

          protected MediaType resolveContentTypeByAccept(List<MediaType> accepts,
                                             Object entity)

    - #### getHttpMethods

          public Set<String> getHttpMethods()

    - #### getProduces

          public MediaType[] getProduces()

    - #### getConsumes

          public MediaType[] getConsumes()

Copyright © 2014. All Rights Reserved.