org.jboss.resteasy.spi
Interface HttpRequest

All Known Implementing Classes:
HttpRequestImpl, HttpServletInputMessage, JBossWebAsyncHttpRequest, MockHttpRequest, Servlet3AsyncHttpRequest, Tomcat6AsyncHttpRequest

public interface HttpRequest

Bridge interface between the base Resteasy JAX-RS implementation and the actual HTTP transport (i.e. a servlet container)

Version:
$Revision: 1 $
Author:
Bill Burke

Method Summary
 AsynchronousResponse createAsynchronousResponse(long suspendTimeout)
          This method will create an asynchronous response and prepare the request to be issued asynchronously
 AsynchronousResponse getAsynchronousResponse()
          Returns the AsynchronousResponse created by createAsynchronousResponse
 Object getAttribute(String attribute)
          Map of contextual data.
 MultivaluedMap<String,String> getDecodedFormParameters()
           
 MultivaluedMap<String,String> getFormParameters()
          application/x-www-form-urlencoded parameters

This is here because @FormParam needs it and for when there are servlet filters that eat up the input stream

 HttpHeaders getHttpHeaders()
           
 String getHttpMethod()
           
 InputStream getInputStream()
           
 String getPreprocessedPath()
          Encoded preprocessed path with extension mappings and matrix parameters removed
 UriInfo getUri()
           
 void initialRequestThreadFinished()
          Callback by the initial calling thread.
 boolean isInitial()
          Asynchronous HTTP support.
 boolean isSuspended()
          Asynchronous HTTP support.
 void removeAttribute(String name)
           
 void setAttribute(String name, Object value)
           
 void setInputStream(InputStream stream)
          If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream().
 void setPreprocessedPath(String path)
           
 

Method Detail

getHttpHeaders

HttpHeaders getHttpHeaders()

getInputStream

InputStream getInputStream()

setInputStream

void setInputStream(InputStream stream)
If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream(). It will only override it for the resteasy HttpRequest

Parameters:
stream -

getUri

UriInfo getUri()

getHttpMethod

String getHttpMethod()

getPreprocessedPath

String getPreprocessedPath()
Encoded preprocessed path with extension mappings and matrix parameters removed

Returns:

setPreprocessedPath

void setPreprocessedPath(String path)

getFormParameters

MultivaluedMap<String,String> getFormParameters()
application/x-www-form-urlencoded parameters

This is here because @FormParam needs it and for when there are servlet filters that eat up the input stream

Returns:
null if no parameters, this is encoded map

getDecodedFormParameters

MultivaluedMap<String,String> getDecodedFormParameters()

getAttribute

Object getAttribute(String attribute)
Map of contextual data. Similar to HttpServletRequest attributes

Returns:

setAttribute

void setAttribute(String name,
                  Object value)

removeAttribute

void removeAttribute(String name)

isInitial

boolean isInitial()
Asynchronous HTTP support. Mirrors Servlet 3.0 API


isSuspended

boolean isSuspended()
Asynchronous HTTP support. Mirrors Servlet 3.0 API


createAsynchronousResponse

AsynchronousResponse createAsynchronousResponse(long suspendTimeout)
This method will create an asynchronous response and prepare the request to be issued asynchronously

Returns:

getAsynchronousResponse

AsynchronousResponse getAsynchronousResponse()
Returns the AsynchronousResponse created by createAsynchronousResponse

Returns:

initialRequestThreadFinished

void initialRequestThreadFinished()
Callback by the initial calling thread. This callback will probably do nothing in an asynchronous environment but will be used to simulate AsynchronousResponse in vanilla Servlet containers that do not support asychronous HTTP.



Copyright © 2012. All Rights Reserved.