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 Details

    • InternalDispatcher

      public InternalDispatcher()
  • Method Details

    • getInstance

      public static InternalDispatcher getInstance()
    • setInstance

      public static void setInstance(InternalDispatcher instance)
    • getEntity

      public Object getEntity(String uri)
    • delete

      public jakarta.ws.rs.core.Response delete(String uri)
    • putEntity

      public jakarta.ws.rs.core.Response putEntity(String uri, String contentType, Object entity)
    • putEntity

      public jakarta.ws.rs.core.Response putEntity(String uri, Object entity)
    • executeEntity

      public jakarta.ws.rs.core.Response executeEntity(String method, String uri, String contentType, Object entity)
    • postEntity

      public jakarta.ws.rs.core.Response postEntity(String uri, String contentType, Object entity)
    • postEntity

      public jakarta.ws.rs.core.Response postEntity(String uri, Object entity)
    • getResponse

      public jakarta.ws.rs.core.Response getResponse(String uri)
    • getResponse

      public jakarta.ws.rs.core.Response getResponse(MockHttpRequest request)
    • getResponse

      public jakarta.ws.rs.core.Response getResponse(MockHttpRequest request, Object entity)
    • enhanceRequest

      protected void enhanceRequest(MockHttpRequest request)
    • createRequest

      public static MockHttpRequest createRequest(String relativeUri, String verb)