public class DefaultSpdyHeaderBlock extends Object implements SpdyHeaderBlock
SpdyHeaderBlock
implementation.Modifier | Constructor and Description |
---|---|
protected |
DefaultSpdyHeaderBlock()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String name,
Object value)
Adds a new header with the specified name and value.
|
protected void |
appendHeaders(StringBuilder buf) |
void |
clearHeaders()
Removes all headers from this block.
|
boolean |
containsHeader(String name)
Returns
true if and only if there is a header with the specified
header name. |
String |
getHeader(String name)
Returns the header value with the specified header name.
|
Set<String> |
getHeaderNames()
Returns the
Set of all header names that this block contains. |
List<Map.Entry<String,String>> |
getHeaders()
Returns all header names and values that this block contains.
|
List<String> |
getHeaders(String name)
Returns the header values with the specified header name.
|
boolean |
isInvalid()
Returns
true if this header block is invalid. |
void |
removeHeader(String name)
Removes the header with the specified name.
|
void |
setHeader(String name,
Iterable<?> values)
Sets a new header with the specified name and values.
|
void |
setHeader(String name,
Object value)
Sets a new header with the specified name and value.
|
void |
setInvalid()
Marks this header block as invalid.
|
protected DefaultSpdyHeaderBlock()
public boolean isInvalid()
SpdyHeaderBlock
true
if this header block is invalid.
A RST_STREAM frame with code PROTOCOL_ERROR should be sent.isInvalid
in interface SpdyHeaderBlock
public void setInvalid()
SpdyHeaderBlock
setInvalid
in interface SpdyHeaderBlock
public void addHeader(String name, Object value)
SpdyHeaderBlock
addHeader
in interface SpdyHeaderBlock
public void setHeader(String name, Object value)
SpdyHeaderBlock
setHeader
in interface SpdyHeaderBlock
public void setHeader(String name, Iterable<?> values)
SpdyHeaderBlock
setHeader
in interface SpdyHeaderBlock
public void removeHeader(String name)
SpdyHeaderBlock
removeHeader
in interface SpdyHeaderBlock
public void clearHeaders()
SpdyHeaderBlock
clearHeaders
in interface SpdyHeaderBlock
public String getHeader(String name)
SpdyHeaderBlock
getHeader
in interface SpdyHeaderBlock
null
if there is no such headerpublic List<String> getHeaders(String name)
SpdyHeaderBlock
getHeaders
in interface SpdyHeaderBlock
List
of header values. An empty list if there is no
such header.public List<Map.Entry<String,String>> getHeaders()
SpdyHeaderBlock
getHeaders
in interface SpdyHeaderBlock
List
of the header name-value pairs. An empty list
if there is no header in this message.public boolean containsHeader(String name)
SpdyHeaderBlock
true
if and only if there is a header with the specified
header name.containsHeader
in interface SpdyHeaderBlock
public Set<String> getHeaderNames()
SpdyHeaderBlock
Set
of all header names that this block contains.getHeaderNames
in interface SpdyHeaderBlock
protected void appendHeaders(StringBuilder buf)
Copyright © 2008-2014 The Netty Project. All Rights Reserved.