org.jboss.resteasy.core

## Class SynchronousDispatcher

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

- All Implemented Interfaces:
    Dispatcher
  Direct Known Subclasses:
    AsynchronousDispatcher

      public class SynchronousDispatcher
      extends Object
      implements Dispatcher

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<Class,Object>` | `defaultContextObjects`
    `protected ResteasyProviderFactory` | `providerFactory`
    `protected Registry` | `registry`
    `protected List<HttpRequestPreprocessor>` | `requestPreprocessors`
    `protected Set<String>` | `unwrappedExceptions`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SynchronousDispatcher(ResteasyProviderFactory providerFactory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addHttpPreprocessor(HttpRequestPreprocessor httpPreprocessor)`
    `void` | `asynchronousDelivery(HttpRequest request, HttpResponse response, Response jaxrsResponse)`
    `void` | `asynchronousExceptionDelivery(HttpRequest request, HttpResponse response, Throwable exception)`
    `void` | `clearContextData()`
    `Response` | `execute(HttpRequest request, HttpResponse response, ResourceInvoker invoker)` Return a response wither from an invoke or exception handling
    `Map<Class,Object>` | `getDefaultContextObjects()`
    `ResourceInvoker` | `getInvoker(HttpRequest request)`
    `ResteasyProviderFactory` | `getProviderFactory()`
    `Registry` | `getRegistry()`
    `Set<String>` | `getUnwrappedExceptions()`
    `Response` | `internalInvocation(HttpRequest request, HttpResponse response, Object entity)`
    `void` | `invoke(HttpRequest request, HttpResponse response)`
    `void` | `invoke(HttpRequest request, HttpResponse response, ResourceInvoker invoker)` Invoke and write response
    `void` | `invokePropagateNotFound(HttpRequest request, HttpResponse response)` Propagate NotFoundException.
    `Response` | `preprocess(HttpRequest request)`
    `protected boolean` | `preprocess(HttpRequest request, HttpResponse response)` Call pre-process ContainerRequestFilters
    `void` | `pushContextObjects(HttpRequest request, HttpResponse response)`
    `void` | `writeException(HttpRequest request, HttpResponse response, Throwable e)`
    `protected void` | `writeResponse(HttpRequest request, HttpResponse response, Response jaxrsResponse)`

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

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

- - ### Field Detail

    - #### providerFactory

          protected ResteasyProviderFactory providerFactory

    - #### registry

          protected Registry registry

    - #### requestPreprocessors

          protected List<HttpRequestPreprocessor> requestPreprocessors

    - #### defaultContextObjects

          protected Map<Class,Object> defaultContextObjects

    - #### unwrappedExceptions

          protected Set<String> unwrappedExceptions

  - ### Constructor Detail

    - #### SynchronousDispatcher

          public SynchronousDispatcher(ResteasyProviderFactory providerFactory)

  - ### Method Detail

    - #### getProviderFactory

          public ResteasyProviderFactory getProviderFactory()

      Specified by:
        `getProviderFactory` in interface `Dispatcher`

    - #### getRegistry

          public Registry getRegistry()

      Specified by:
        `getRegistry` in interface `Dispatcher`

    - #### getDefaultContextObjects

          public Map<Class,Object> getDefaultContextObjects()

      Specified by:
        `getDefaultContextObjects` in interface `Dispatcher`

    - #### getUnwrappedExceptions

          public Set<String> getUnwrappedExceptions()

    - #### preprocess

          public Response preprocess(HttpRequest request)

    - #### preprocess

          protected boolean preprocess(HttpRequest request,
                           HttpResponse response)

      Call pre-process ContainerRequestFilters
      Returns:
        true if request should continue

    - #### writeException

          public void writeException(HttpRequest request,
                            HttpResponse response,
                            Throwable e)

    - #### invoke

          public void invoke(HttpRequest request,
                    HttpResponse response)

      Specified by:
        `invoke` in interface `Dispatcher`

    - #### invokePropagateNotFound

          public void invokePropagateNotFound(HttpRequest request,
                                     HttpResponse response)
                                       throws NotFoundException

      Propagate NotFoundException. This is used for Filters
      Parameters:
        `request` -
        `response` -
      Throws:
        `NotFoundException`

    - #### getInvoker

          public ResourceInvoker getInvoker(HttpRequest request)
                                     throws Failure

      Throws:
        `Failure`

    - #### pushContextObjects

          public void pushContextObjects(HttpRequest request,
                                HttpResponse response)

    - #### internalInvocation

          public Response internalInvocation(HttpRequest request,
                                    HttpResponse response,
                                    Object entity)

      Specified by:
        `internalInvocation` in interface `Dispatcher`

    - #### clearContextData

          public void clearContextData()

    - #### execute

          public Response execute(HttpRequest request,
                         HttpResponse response,
                         ResourceInvoker invoker)

      Return a response wither from an invoke or exception handling
      Parameters:
        `request` -
        `response` -
        `invoker` -
      Returns:

    - #### invoke

          public void invoke(HttpRequest request,
                    HttpResponse response,
                    ResourceInvoker invoker)

      Invoke and write response
      Parameters:
        `request` -
        `response` -
        `invoker` -

    - #### asynchronousDelivery

          public void asynchronousDelivery(HttpRequest request,
                                  HttpResponse response,
                                  Response jaxrsResponse)
                                    throws IOException

      Throws:
        `IOException`

    - #### asynchronousExceptionDelivery

          public void asynchronousExceptionDelivery(HttpRequest request,
                                           HttpResponse response,
                                           Throwable exception)

    - #### writeResponse

          protected void writeResponse(HttpRequest request,
                           HttpResponse response,
                           Response jaxrsResponse)

    - #### addHttpPreprocessor

          public void addHttpPreprocessor(HttpRequestPreprocessor httpPreprocessor)

      Specified by:
        `addHttpPreprocessor` in interface `Dispatcher`

Copyright © 2014. All Rights Reserved.