Package org.jboss.resteasy.core

## Class InternalDispatcher

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

-     public class InternalDispatcher
      extends Object

  InternalDispatch represents a "forward" in servlet terms. You can perform an internal GET/POST/DELETE/PUT using IntenalDispatch using Java Object. For example:

       @GET
       @Produces("text/plain")
       @Path("/forward/object")
       public SomeObject forward(@Context InternalDispatcher dispatcher)
       {
          return (SomeObject) dispatcher.getEntity("/some-object");
       }

  That previous snippet performs an internal request to /some-object and returns the Object representation of the Resource that lives at "/some-object".

  Version:
    $Revision: 1 $
  Author:
    Solomon Duskis

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InternalDispatcher()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static MockHttpRequest` | `createRequest​(String relativeUri, String verb)` |
    `javax.ws.rs.core.Response` | `delete​(String uri)` |
    `protected void` | `enhanceRequest​(MockHttpRequest request)` |
    `javax.ws.rs.core.Response` | `executeEntity​(String method, String uri, String contentType, Object entity)` |
    `Object` | `getEntity​(String uri)` |
    `static InternalDispatcher` | `getInstance()` |
    `javax.ws.rs.core.Response` | `getResponse​(String uri)` |
    `javax.ws.rs.core.Response` | `getResponse​(MockHttpRequest request)` |
    `javax.ws.rs.core.Response` | `getResponse​(MockHttpRequest request, Object entity)` |
    `javax.ws.rs.core.Response` | `postEntity​(String uri, Object entity)` |
    `javax.ws.rs.core.Response` | `postEntity​(String uri, String contentType, Object entity)` |
    `javax.ws.rs.core.Response` | `putEntity​(String uri, Object entity)` |
    `javax.ws.rs.core.Response` | `putEntity​(String uri, String contentType, Object entity)` |
    `static void` | `setInstance​(InternalDispatcher instance)` |

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

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

- - ### Constructor Detail

    - #### InternalDispatcher

          public InternalDispatcher()

  - ### Method Detail

    - #### getInstance

          public static InternalDispatcher getInstance()

    - #### setInstance

          public static void setInstance​(InternalDispatcher instance)

    - #### getEntity

          public Object getEntity​(String uri)

    - #### delete

          public javax.ws.rs.core.Response delete​(String uri)

    - #### putEntity

          public javax.ws.rs.core.Response putEntity​(String uri,
                                                     String contentType,
                                                     Object entity)

    - #### putEntity

          public javax.ws.rs.core.Response putEntity​(String uri,
                                                     Object entity)

    - #### executeEntity

          public javax.ws.rs.core.Response executeEntity​(String method,
                                                         String uri,
                                                         String contentType,
                                                         Object entity)

    - #### postEntity

          public javax.ws.rs.core.Response postEntity​(String uri,
                                                      String contentType,
                                                      Object entity)

    - #### postEntity

          public javax.ws.rs.core.Response postEntity​(String uri,
                                                      Object entity)

    - #### getResponse

          public javax.ws.rs.core.Response getResponse​(String uri)

    - #### getResponse

          public javax.ws.rs.core.Response getResponse​(MockHttpRequest request)

    - #### getResponse

          public javax.ws.rs.core.Response getResponse​(MockHttpRequest request,
                                                       Object entity)

    - #### enhanceRequest

          protected void enhanceRequest​(MockHttpRequest request)

    - #### createRequest

          public static MockHttpRequest createRequest​(String relativeUri,
                                                      String verb)