public class SpdyHeaders extends Object
SpdyHeadersFrame
.Modifier and Type | Class and Description |
---|---|
static class |
SpdyHeaders.HttpNames
SPDY HTTP header names
|
static class |
SpdyHeaders.Spdy2HttpNames
SPDY/2 HTTP header names
|
Modifier and Type | Method and Description |
---|---|
static void |
addHeader(SpdyHeadersFrame frame,
String name,
Object value)
Adds a new header with the specified name and value.
|
static String |
getHeader(SpdyHeadersFrame frame,
String name)
Returns the header value with the specified header name.
|
static String |
getHeader(SpdyHeadersFrame frame,
String name,
String defaultValue)
Returns the header value with the specified header name.
|
static String |
getHost(SpdyHeadersFrame frame)
Returns the SPDY host header.
|
static HttpMethod |
getMethod(int spdyVersion,
SpdyHeadersFrame frame)
Returns the
HttpMethod represented by the HTTP method header. |
static String |
getScheme(int spdyVersion,
SpdyHeadersFrame frame)
Returns the value of the URL scheme header.
|
static HttpResponseStatus |
getStatus(int spdyVersion,
SpdyHeadersFrame frame)
Returns the
HttpResponseStatus represented by the HTTP response status header. |
static String |
getUrl(int spdyVersion,
SpdyHeadersFrame frame)
Returns the value of the URL path header.
|
static HttpVersion |
getVersion(int spdyVersion,
SpdyHeadersFrame frame)
Returns the
HttpVersion represented by the HTTP version header. |
static void |
removeHost(SpdyHeadersFrame frame)
Removes the SPDY host header.
|
static void |
removeMethod(int spdyVersion,
SpdyHeadersFrame frame)
Removes the HTTP method header.
|
static void |
removeScheme(int spdyVersion,
SpdyHeadersFrame frame)
Removes the URL scheme header.
|
static void |
removeStatus(int spdyVersion,
SpdyHeadersFrame frame)
Removes the HTTP response status header.
|
static void |
removeUrl(int spdyVersion,
SpdyHeadersFrame frame)
Removes the URL path header.
|
static void |
removeVersion(int spdyVersion,
SpdyHeadersFrame frame)
Removes the HTTP version header.
|
static void |
setHeader(SpdyHeadersFrame frame,
String name,
Iterable<?> values)
Sets a new header with the specified name and values.
|
static void |
setHeader(SpdyHeadersFrame frame,
String name,
Object value)
Sets a new header with the specified name and value.
|
static void |
setHost(SpdyHeadersFrame frame,
String host)
Set the SPDY host header.
|
static void |
setMethod(int spdyVersion,
SpdyHeadersFrame frame,
HttpMethod method)
Sets the HTTP method header.
|
static void |
setScheme(int spdyVersion,
SpdyHeadersFrame frame,
String scheme)
Sets the URL scheme header.
|
static void |
setStatus(int spdyVersion,
SpdyHeadersFrame frame,
HttpResponseStatus status)
Sets the HTTP response status header.
|
static void |
setUrl(int spdyVersion,
SpdyHeadersFrame frame,
String path)
Sets the URL path header.
|
static void |
setVersion(int spdyVersion,
SpdyHeadersFrame frame,
HttpVersion httpVersion)
Sets the HTTP version header.
|
public static String getHeader(SpdyHeadersFrame frame, String name)
null
if there is no such headerpublic static String getHeader(SpdyHeadersFrame frame, String name, String defaultValue)
defaultValue
if there is no such
headerpublic static void setHeader(SpdyHeadersFrame frame, String name, Object value)
public static void setHeader(SpdyHeadersFrame frame, String name, Iterable<?> values)
public static void addHeader(SpdyHeadersFrame frame, String name, Object value)
public static void removeHost(SpdyHeadersFrame frame)
public static String getHost(SpdyHeadersFrame frame)
public static void setHost(SpdyHeadersFrame frame, String host)
public static void removeMethod(int spdyVersion, SpdyHeadersFrame frame)
public static HttpMethod getMethod(int spdyVersion, SpdyHeadersFrame frame)
HttpMethod
represented by the HTTP method header.public static void setMethod(int spdyVersion, SpdyHeadersFrame frame, HttpMethod method)
public static void removeScheme(int spdyVersion, SpdyHeadersFrame frame)
public static String getScheme(int spdyVersion, SpdyHeadersFrame frame)
public static void setScheme(int spdyVersion, SpdyHeadersFrame frame, String scheme)
public static void removeStatus(int spdyVersion, SpdyHeadersFrame frame)
public static HttpResponseStatus getStatus(int spdyVersion, SpdyHeadersFrame frame)
HttpResponseStatus
represented by the HTTP response status header.public static void setStatus(int spdyVersion, SpdyHeadersFrame frame, HttpResponseStatus status)
public static void removeUrl(int spdyVersion, SpdyHeadersFrame frame)
public static String getUrl(int spdyVersion, SpdyHeadersFrame frame)
public static void setUrl(int spdyVersion, SpdyHeadersFrame frame, String path)
public static void removeVersion(int spdyVersion, SpdyHeadersFrame frame)
public static HttpVersion getVersion(int spdyVersion, SpdyHeadersFrame frame)
HttpVersion
represented by the HTTP version header.public static void setVersion(int spdyVersion, SpdyHeadersFrame frame, HttpVersion httpVersion)
Copyright © 2008-2014 The Netty Project. All Rights Reserved.