public class DefaultSpdyHeadersFrame extends DefaultSpdyStreamFrame implements SpdyHeadersFrame
SpdyHeadersFrame
implementation.Constructor and Description |
---|
DefaultSpdyHeadersFrame(int streamId)
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. |
boolean |
isTruncated()
Returns
true if this header block has been truncated due to
length restrictions. |
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.
|
void |
setTruncated()
Mark this header block as truncated.
|
String |
toString() |
getStreamId, isLast, setLast, setStreamId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getStreamId, isLast, setLast, setStreamId
public DefaultSpdyHeadersFrame(int streamId)
streamId
- the Stream-ID of this framepublic boolean isInvalid()
SpdyHeadersFrame
true
if this header block is invalid.
A RST_STREAM frame with code PROTOCOL_ERROR should be sent.isInvalid
in interface SpdyHeadersFrame
public void setInvalid()
SpdyHeadersFrame
setInvalid
in interface SpdyHeadersFrame
public boolean isTruncated()
SpdyHeadersFrame
true
if this header block has been truncated due to
length restrictions.isTruncated
in interface SpdyHeadersFrame
public void setTruncated()
SpdyHeadersFrame
setTruncated
in interface SpdyHeadersFrame
public void addHeader(String name, Object value)
SpdyHeadersFrame
addHeader
in interface SpdyHeadersFrame
public void setHeader(String name, Object value)
SpdyHeadersFrame
setHeader
in interface SpdyHeadersFrame
public void setHeader(String name, Iterable<?> values)
SpdyHeadersFrame
setHeader
in interface SpdyHeadersFrame
public void removeHeader(String name)
SpdyHeadersFrame
removeHeader
in interface SpdyHeadersFrame
public void clearHeaders()
SpdyHeadersFrame
clearHeaders
in interface SpdyHeadersFrame
public String getHeader(String name)
SpdyHeadersFrame
getHeader
in interface SpdyHeadersFrame
null
if there is no such headerpublic List<String> getHeaders(String name)
SpdyHeadersFrame
getHeaders
in interface SpdyHeadersFrame
List
of header values. An empty list if there is no
such header.public List<Map.Entry<String,String>> getHeaders()
SpdyHeadersFrame
getHeaders
in interface SpdyHeadersFrame
List
of the header name-value pairs. An empty list
if there is no header in this message.public boolean containsHeader(String name)
SpdyHeadersFrame
true
if and only if there is a header with the specified
header name.containsHeader
in interface SpdyHeadersFrame
public Set<String> getHeaderNames()
SpdyHeadersFrame
Set
of all header names that this block contains.getHeaderNames
in interface SpdyHeadersFrame
protected void appendHeaders(StringBuilder buf)
Copyright © 2008-2014 The Netty Project. All Rights Reserved.