org.apache.mina.http

## Class HttpRequestImpl

- java.lang.Object
- - org.apache.mina.http.HttpRequestImpl

- All Implemented Interfaces:
    HttpMessage, HttpRequest

      public class HttpRequestImpl
      extends Object
      implements HttpRequest

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpRequestImpl(HttpVersion version, HttpMethod method, String requestedPath, String queryString, Map<String,String> headers)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsHeader(String name)` Returns `true` if the HTTP header with the specified name exists in this request.
    `boolean` | `containsParameter(String name)` Determines whether this request contains at least one parameter with the specified name
    `String` | `getContentType()` Gets the `Content-Type` header of the message.
    `String` | `getHeader(String name)` Returns the value of the HTTP header with the specified name.
    `Map<String,String>` | `getHeaders()` Returns a read-only `Map` of HTTP headers whose key is a `String` and whose value is a `String` s.
    `HttpMethod` | `getMethod()` Return the HTTP method used for this message `HttpMethod`
    `String` | `getParameter(String name)` Returns the value of a request parameter as a String, or null if the parameter does not exist.
    `Map<String,List<String>>` | `getParameters()` Returns a read only `Map` of query parameters whose key is a `String` and whose value is a `List` of `String`s.
    `HttpVersion` | `getProtocolVersion()` The HTTP version of the message
    `String` | `getQueryString()`
    `String` | `getRequestPath()` Retrurn the HTTP request path
    `boolean` | `isKeepAlive()` Returns `true` if this message enables keep-alive connection.
    `protected Matcher` | `parameterPattern(String name)`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### HttpRequestImpl

          public HttpRequestImpl(HttpVersion version,
                         HttpMethod method,
                         String requestedPath,
                         String queryString,
                         Map<String,String> headers)

  - ### Method Detail

    - #### getProtocolVersion

          public HttpVersion getProtocolVersion()

      Description copied from interface: `HttpMessage`
      The HTTP version of the message
      Specified by:
        `getProtocolVersion` in interface `HttpMessage`
      Returns:
        HTTP/1.0 or HTTP/1.1

    - #### getContentType

          public String getContentType()

      Description copied from interface: `HttpMessage`
      Gets the `Content-Type` header of the message.
      Specified by:
        `getContentType` in interface `HttpMessage`
      Returns:
        The content type.

    - #### isKeepAlive

          public boolean isKeepAlive()

      Description copied from interface: `HttpMessage`
      Returns `true` if this message enables keep-alive connection.
      Specified by:
        `isKeepAlive` in interface `HttpMessage`

    - #### getHeader

          public String getHeader(String name)

      Description copied from interface: `HttpMessage`
      Returns the value of the HTTP header with the specified name. If more than one header with the given name is associated with this request, one is selected and returned.
      Specified by:
        `getHeader` in interface `HttpMessage`
      Parameters:
        `name` - The name of the desired header
      Returns:
        The header value - or null if no header is found with the specified name

    - #### containsHeader

          public boolean containsHeader(String name)

      Description copied from interface: `HttpMessage`
      Returns `true` if the HTTP header with the specified name exists in this request.
      Specified by:
        `containsHeader` in interface `HttpMessage`

    - #### getHeaders

          public Map<String,String> getHeaders()

      Description copied from interface: `HttpMessage`
      Returns a read-only `Map` of HTTP headers whose key is a `String` and whose value is a `String` s.
      Specified by:
        `getHeaders` in interface `HttpMessage`

    - #### containsParameter

          public boolean containsParameter(String name)

      Description copied from interface: `HttpRequest`
      Determines whether this request contains at least one parameter with the specified name
      Specified by:
        `containsParameter` in interface `HttpRequest`
      Parameters:
        `name` - The parameter name
      Returns:
        `true` if this request contains at least one parameter with the specified name

    - #### getParameter

          public String getParameter(String name)

      Description copied from interface: `HttpRequest`
      Returns the value of a request parameter as a String, or null if the parameter does not exist. If the request contained multiple parameters with the same name, this method returns the first parameter encountered in the request with the specified name
      Specified by:
        `getParameter` in interface `HttpRequest`
      Parameters:
        `name` - The parameter name
      Returns:
        The value

    - #### parameterPattern

          protected Matcher parameterPattern(String name)

    - #### getParameters

          public Map<String,List<String>> getParameters()

      Description copied from interface: `HttpRequest`
      Returns a read only `Map` of query parameters whose key is a `String` and whose value is a `List` of `String`s.
      Specified by:
        `getParameters` in interface `HttpRequest`

    - #### getQueryString

          public String getQueryString()

      Specified by:
        `getQueryString` in interface `HttpRequest`

    - #### getMethod

          public HttpMethod getMethod()

      Description copied from interface: `HttpRequest`
      Return the HTTP method used for this message `HttpMethod`
      Specified by:
        `getMethod` in interface `HttpRequest`
      Returns:
        the method

    - #### getRequestPath

          public String getRequestPath()

      Description copied from interface: `HttpRequest`
      Retrurn the HTTP request path
      Specified by:
        `getRequestPath` in interface `HttpRequest`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2004-2012 Apache MINA Project. All Rights Reserved.