net.craftforge.essential.context.basic
Class BasicRequestImpl

java.lang.Object
  extended by net.craftforge.essential.context.basic.BasicRequestImpl
All Implemented Interfaces:
Request

public class BasicRequestImpl
extends Object
implements Request

A basic implementation of a controller request.

Since:
20.06.11
Author:
Christian Bick

Constructor Summary
BasicRequestImpl(String httpMethod, String urlInfoPart, Map<String,String[]> requestHeaders, Map<String,String[]> requestParameters, InputStream inputStream)
          Creates a basic request.
 
Method Summary
 InputStream getBodyInputStream()
          Gets the input stream of the request body.
 Map<String,String[]> getHeaders()
          Gets the headers of the request.
 String getHttpMethod()
          Gets the HTTP method of the request.
 Map<String,String[]> getParameters()
          Gets the parameter map, containing all query or form parameters being delivered in the request.
 String getUrlInfoPart()
          Gets the info part of the request url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicRequestImpl

public BasicRequestImpl(String httpMethod,
                        String urlInfoPart,
                        Map<String,String[]> requestHeaders,
                        Map<String,String[]> requestParameters,
                        InputStream inputStream)
Creates a basic request.

Parameters:
httpMethod - The HTTP request method
urlInfoPart - The request URL info part
requestHeaders - The HTTP request headers
requestParameters - The HTTP request parameters
inputStream - The HTTP body input stream
Method Detail

getHttpMethod

public String getHttpMethod()
Gets the HTTP method of the request.

Specified by:
getHttpMethod in interface Request
Returns:
The HTTP method of the request

getUrlInfoPart

public String getUrlInfoPart()
Gets the info part of the request url. This is the part being responsible for allocating resources within the framework.

Specified by:
getUrlInfoPart in interface Request
Returns:
The info part of the request url

getHeaders

public Map<String,String[]> getHeaders()
Gets the headers of the request.

Specified by:
getHeaders in interface Request
Returns:
The headers as a map (keys = header names, values = header contents)

getParameters

public Map<String,String[]> getParameters()
Gets the parameter map, containing all query or form parameters being delivered in the request.

Specified by:
getParameters in interface Request
Returns:
The parameter map

getBodyInputStream

public InputStream getBodyInputStream()
Gets the input stream of the request body.

Specified by:
getBodyInputStream in interface Request
Returns:
The input stream of the request body.


Copyright © 2011. All Rights Reserved.