org.jboss.netty.handler.codec.spdy

## Class SpdyHeaders

- java.lang.Object
- - org.jboss.netty.handler.codec.spdy.SpdyHeaders

-     public class SpdyHeaders
      extends Object

  Provides the constants for the standard SPDY HTTP header names and commonly used utility methods that access a `SpdyHeaderBlock`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SpdyHeaders.HttpNames` SPDY HTTP header names
    `static class` | `SpdyHeaders.Spdy2HttpNames` SPDY/2 HTTP header names

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addHeader(SpdyHeaderBlock block, String name, Object value)` Adds a new header with the specified name and value.
    `static String` | `getHeader(SpdyHeaderBlock block, String name)` Returns the header value with the specified header name.
    `static String` | `getHeader(SpdyHeaderBlock block, String name, String defaultValue)` Returns the header value with the specified header name.
    `static String` | `getHost(SpdyHeaderBlock block)` Returns the SPDY host header.
    `static HttpMethod` | `getMethod(int spdyVersion, SpdyHeaderBlock block)` Returns the `HttpMethod` represented by the HTTP method header.
    `static HttpMethod` | `getMethod(SpdyHeaderBlock block)` Deprecated.
    `static String` | `getScheme(int spdyVersion, SpdyHeaderBlock block)` Returns the value of the URL scheme header.
    `static String` | `getScheme(SpdyHeaderBlock block)` Deprecated.
    `static HttpResponseStatus` | `getStatus(int spdyVersion, SpdyHeaderBlock block)` Returns the `HttpResponseStatus` represented by the HTTP response status header.
    `static HttpResponseStatus` | `getStatus(SpdyHeaderBlock block)` Deprecated.
    `static String` | `getUrl(int spdyVersion, SpdyHeaderBlock block)` Returns the value of the URL path header.
    `static String` | `getUrl(SpdyHeaderBlock block)` Deprecated.
    `static HttpVersion` | `getVersion(int spdyVersion, SpdyHeaderBlock block)` Returns the `HttpVersion` represented by the HTTP version header.
    `static HttpVersion` | `getVersion(SpdyHeaderBlock block)` Deprecated.
    `static void` | `removeHost(SpdyHeaderBlock block)` Removes the SPDY host header.
    `static void` | `removeMethod(int spdyVersion, SpdyHeaderBlock block)` Removes the HTTP method header.
    `static void` | `removeMethod(SpdyHeaderBlock block)` Deprecated.
    `static void` | `removeScheme(int spdyVersion, SpdyHeaderBlock block)` Removes the URL scheme header.
    `static void` | `removeScheme(SpdyHeaderBlock block)` Deprecated.
    `static void` | `removeStatus(int spdyVersion, SpdyHeaderBlock block)` Removes the HTTP response status header.
    `static void` | `removeStatus(SpdyHeaderBlock block)` Deprecated.
    `static void` | `removeUrl(int spdyVersion, SpdyHeaderBlock block)` Removes the URL path header.
    `static void` | `removeUrl(SpdyHeaderBlock block)` Deprecated.
    `static void` | `removeVersion(int spdyVersion, SpdyHeaderBlock block)` Removes the HTTP version header.
    `static void` | `removeVersion(SpdyHeaderBlock block)` Deprecated.
    `static void` | `setHeader(SpdyHeaderBlock block, String name, Iterable<?> values)` Sets a new header with the specified name and values.
    `static void` | `setHeader(SpdyHeaderBlock block, String name, Object value)` Sets a new header with the specified name and value.
    `static void` | `setHost(SpdyHeaderBlock block, String host)` Set the SPDY host header.
    `static void` | `setMethod(int spdyVersion, SpdyHeaderBlock block, HttpMethod method)` Sets the HTTP method header.
    `static void` | `setMethod(SpdyHeaderBlock block, HttpMethod method)` Deprecated.
    `static void` | `setScheme(int spdyVersion, SpdyHeaderBlock block, String scheme)` Sets the URL scheme header.
    `static void` | `setScheme(SpdyHeaderBlock block, String scheme)` Deprecated.
    `static void` | `setStatus(int spdyVersion, SpdyHeaderBlock block, HttpResponseStatus status)` Sets the HTTP response status header.
    `static void` | `setStatus(SpdyHeaderBlock block, HttpResponseStatus status)` Deprecated.
    `static void` | `setUrl(int spdyVersion, SpdyHeaderBlock block, String path)` Sets the URL path header.
    `static void` | `setUrl(SpdyHeaderBlock block, String path)` Deprecated.
    `static void` | `setVersion(int spdyVersion, SpdyHeaderBlock block, HttpVersion httpVersion)` Sets the HTTP version header.
    `static void` | `setVersion(SpdyHeaderBlock block, HttpVersion httpVersion)` Deprecated.

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

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

- - ### Method Detail

    - #### getHeader

          public static String getHeader(SpdyHeaderBlock block,
                         String name)

      Returns the header value with the specified header name. If there are more than one header value for the specified header name, the first value is returned.
      Returns:
        the header value or `null` if there is no such header

    - #### getHeader

          public static String getHeader(SpdyHeaderBlock block,
                         String name,
                         String defaultValue)

      Returns the header value with the specified header name. If there are more than one header value for the specified header name, the first value is returned.
      Returns:
        the header value or the `defaultValue` if there is no such header

    - #### setHeader

          public static void setHeader(SpdyHeaderBlock block,
                       String name,
                       Object value)

      Sets a new header with the specified name and value. If there is an existing header with the same name, the existing header is removed.

    - #### setHeader

          public static void setHeader(SpdyHeaderBlock block,
                       String name,
                       Iterable<?> values)

      Sets a new header with the specified name and values. If there is an existing header with the same name, the existing header is removed.

    - #### addHeader

          public static void addHeader(SpdyHeaderBlock block,
                       String name,
                       Object value)

      Adds a new header with the specified name and value.

    - #### removeHost

          public static void removeHost(SpdyHeaderBlock block)

      Removes the SPDY host header.

    - #### getHost

          public static String getHost(SpdyHeaderBlock block)

      Returns the SPDY host header.

    - #### setHost

          public static void setHost(SpdyHeaderBlock block,
                     String host)

      Set the SPDY host header.

    - #### removeMethod

          @Deprecated
          public static void removeMethod(SpdyHeaderBlock block)

      Deprecated.
      Removes the HTTP method header.

    - #### removeMethod

          public static void removeMethod(int spdyVersion,
                          SpdyHeaderBlock block)

      Removes the HTTP method header.

    - #### getMethod

          @Deprecated
          public static HttpMethod getMethod(SpdyHeaderBlock block)

      Deprecated.
      Returns the `HttpMethod` represented by the HTTP method header.

    - #### getMethod

          public static HttpMethod getMethod(int spdyVersion,
                             SpdyHeaderBlock block)

      Returns the `HttpMethod` represented by the HTTP method header.

    - #### setMethod

          @Deprecated
          public static void setMethod(SpdyHeaderBlock block,
                                  HttpMethod method)

      Deprecated.
      Sets the HTTP method header.

    - #### setMethod

          public static void setMethod(int spdyVersion,
                       SpdyHeaderBlock block,
                       HttpMethod method)

      Sets the HTTP method header.

    - #### removeScheme

          @Deprecated
          public static void removeScheme(SpdyHeaderBlock block)

      Deprecated.
      Removes the URL scheme header.

    - #### removeScheme

          public static void removeScheme(int spdyVersion,
                          SpdyHeaderBlock block)

      Removes the URL scheme header.

    - #### getScheme

          @Deprecated
          public static String getScheme(SpdyHeaderBlock block)

      Deprecated.
      Returns the value of the URL scheme header.

    - #### getScheme

          public static String getScheme(int spdyVersion,
                         SpdyHeaderBlock block)

      Returns the value of the URL scheme header.

    - #### setScheme

          @Deprecated
          public static void setScheme(SpdyHeaderBlock block,
                                  String scheme)

      Deprecated.
      Sets the URL scheme header.

    - #### setScheme

          public static void setScheme(int spdyVersion,
                       SpdyHeaderBlock block,
                       String scheme)

      Sets the URL scheme header.

    - #### removeStatus

          @Deprecated
          public static void removeStatus(SpdyHeaderBlock block)

      Deprecated.
      Removes the HTTP response status header.

    - #### removeStatus

          public static void removeStatus(int spdyVersion,
                          SpdyHeaderBlock block)

      Removes the HTTP response status header.

    - #### getStatus

          @Deprecated
          public static HttpResponseStatus getStatus(SpdyHeaderBlock block)

      Deprecated.
      Returns the `HttpResponseStatus` represented by the HTTP response status header.

    - #### getStatus

          public static HttpResponseStatus getStatus(int spdyVersion,
                                     SpdyHeaderBlock block)

      Returns the `HttpResponseStatus` represented by the HTTP response status header.

    - #### setStatus

          @Deprecated
          public static void setStatus(SpdyHeaderBlock block,
                                  HttpResponseStatus status)

      Deprecated.
      Sets the HTTP response status header.

    - #### setStatus

          public static void setStatus(int spdyVersion,
                       SpdyHeaderBlock block,
                       HttpResponseStatus status)

      Sets the HTTP response status header.

    - #### removeUrl

          @Deprecated
          public static void removeUrl(SpdyHeaderBlock block)

      Deprecated.
      Removes the URL path header.

    - #### removeUrl

          public static void removeUrl(int spdyVersion,
                       SpdyHeaderBlock block)

      Removes the URL path header.

    - #### getUrl

          @Deprecated
          public static String getUrl(SpdyHeaderBlock block)

      Deprecated.
      Returns the value of the URL path header.

    - #### getUrl

          public static String getUrl(int spdyVersion,
                      SpdyHeaderBlock block)

      Returns the value of the URL path header.

    - #### setUrl

          @Deprecated
          public static void setUrl(SpdyHeaderBlock block,
                               String path)

      Deprecated.
      Sets the URL path header.

    - #### setUrl

          public static void setUrl(int spdyVersion,
                    SpdyHeaderBlock block,
                    String path)

      Sets the URL path header.

    - #### removeVersion

          @Deprecated
          public static void removeVersion(SpdyHeaderBlock block)

      Deprecated.
      Removes the HTTP version header.

    - #### removeVersion

          public static void removeVersion(int spdyVersion,
                           SpdyHeaderBlock block)

      Removes the HTTP version header.

    - #### getVersion

          @Deprecated
          public static HttpVersion getVersion(SpdyHeaderBlock block)

      Deprecated.
      Returns the `HttpVersion` represented by the HTTP version header.

    - #### getVersion

          public static HttpVersion getVersion(int spdyVersion,
                               SpdyHeaderBlock block)

      Returns the `HttpVersion` represented by the HTTP version header.

    - #### setVersion

          @Deprecated
          public static void setVersion(SpdyHeaderBlock block,
                                   HttpVersion httpVersion)

      Deprecated.
      Sets the HTTP version header.

    - #### setVersion

          public static void setVersion(int spdyVersion,
                        SpdyHeaderBlock block,
                        HttpVersion httpVersion)

      Sets the HTTP version header.

Copyright © 2008-2012 The Netty Project. All Rights Reserved.