All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.resteasy.spi.HttpRequest Maven / Gradle / Ivy

There is a newer version: 4.0.0.Beta5
Show newest version
package org.jboss.resteasy.spi;

import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MultivaluedMap;
import java.io.InputStream;
import java.net.URI;
import java.util.Enumeration;

/**
 * Bridge interface between the base Resteasy JAX-RS implementation and the actual HTTP transport (i.e. a servlet container)
 *
 * @author Bill Burke
 * @version $Revision: 1 $
 */
public interface HttpRequest
{
   HttpHeaders getHttpHeaders();

   MultivaluedMap getMutableHeaders();

   InputStream getInputStream();

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

   /**
    * This method *MUST* always return the same instance.
    * @return uri info
    */
   ResteasyUriInfo getUri();

   String getHttpMethod();
   void setHttpMethod(String method);

   /**
    * Updates the object returned by {@link #getUri()}.
    * @param requestUri request uri
    */
   void setRequestUri(URI requestUri) throws IllegalStateException;
   /**
    * Updates the object returned by {@link #getUri()}.
    * @param baseUri base uri
    * @param requestUri request uri
    */
   void setRequestUri(URI baseUri, URI requestUri) throws IllegalStateException;
   /**
    * 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 * * @return null if no parameters, this is encoded map */ MultivaluedMap getFormParameters(); MultivaluedMap getDecodedFormParameters(); /** * Map of contextual data. Similar to HttpServletRequest attributes * @param attribute attribute name * @return attribute */ Object getAttribute(String attribute); void setAttribute(String name, Object value); void removeAttribute(String name); Enumeration getAttributeNames(); ResteasyAsynchronousContext getAsyncContext(); boolean isInitial(); void forward(String path); boolean wasForwarded(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy