Class DefaultSpdyHeaders
- java.lang.Object
-
- org.jboss.netty.handler.codec.spdy.SpdyHeaders
-
- org.jboss.netty.handler.codec.spdy.DefaultSpdyHeaders
-
public class DefaultSpdyHeaders extends SpdyHeaders
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.netty.handler.codec.spdy.SpdyHeaders
SpdyHeaders.HttpNames
-
-
Field Summary
-
Fields inherited from class org.jboss.netty.handler.codec.spdy.SpdyHeaders
EMPTY_HEADERS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpdyHeaders
add(String name, Iterable<?> values)
Adds a new header with the specified name and values.SpdyHeaders
add(String name, Object value)
Adds a new header with the specified name and value.SpdyHeaders
clear()
Removes all headers from this frame.boolean
contains(String name)
Returnstrue
if and only if there is a header with the specified header name.List<Map.Entry<String,String>>
entries()
Returns all header names and values that this frame contains.String
get(String name)
Returns the header value with the specified header name.List<String>
getAll(String name)
Returns the header values with the specified header name.boolean
isEmpty()
Checks if no header exists.Iterator<Map.Entry<String,String>>
iterator()
Set<String>
names()
Returns theSet
of all header names that this frame contains.SpdyHeaders
remove(String name)
Removes the header with the specified name.SpdyHeaders
set(String name, Iterable<?> values)
Sets a new header with the specified name and values.SpdyHeaders
set(String name, Object value)
Sets a new header with the specified name and value.-
Methods inherited from class org.jboss.netty.handler.codec.spdy.SpdyHeaders
addHeader, getHeader, getHeader, getHost, getMethod, getScheme, getStatus, getUrl, getVersion, removeHost, removeMethod, removeScheme, removeStatus, removeUrl, removeVersion, setHeader, setHeader, setHost, setMethod, setScheme, setStatus, setUrl, setVersion
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
add
public SpdyHeaders add(String name, Object value)
Description copied from class:SpdyHeaders
Adds a new header with the specified name and value.- Specified by:
add
in classSpdyHeaders
-
remove
public SpdyHeaders remove(String name)
Description copied from class:SpdyHeaders
Removes the header with the specified name.- Specified by:
remove
in classSpdyHeaders
-
set
public SpdyHeaders set(String name, Object value)
Description copied from class:SpdyHeaders
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.- Specified by:
set
in classSpdyHeaders
-
set
public SpdyHeaders set(String name, Iterable<?> values)
Description copied from class:SpdyHeaders
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.- Specified by:
set
in classSpdyHeaders
-
clear
public SpdyHeaders clear()
Description copied from class:SpdyHeaders
Removes all headers from this frame.- Specified by:
clear
in classSpdyHeaders
-
get
public String get(String name)
Description copied from class:SpdyHeaders
Returns the header value with the specified header name. If there is more than one header value for the specified header name, the first value is returned.- Specified by:
get
in classSpdyHeaders
- Returns:
- the header value or
null
if there is no such header
-
getAll
public List<String> getAll(String name)
Description copied from class:SpdyHeaders
Returns the header values with the specified header name.- Specified by:
getAll
in classSpdyHeaders
- Returns:
- the
List
of header values. An empty list if there is no such header.
-
entries
public List<Map.Entry<String,String>> entries()
Description copied from class:SpdyHeaders
Returns all header names and values that this frame contains.- Specified by:
entries
in classSpdyHeaders
- Returns:
- the
List
of the header name-value pairs. An empty list if there is no header in this message.
-
contains
public boolean contains(String name)
Description copied from class:SpdyHeaders
Returnstrue
if and only if there is a header with the specified header name.- Specified by:
contains
in classSpdyHeaders
-
names
public Set<String> names()
Description copied from class:SpdyHeaders
Returns theSet
of all header names that this frame contains.- Specified by:
names
in classSpdyHeaders
-
add
public SpdyHeaders add(String name, Iterable<?> values)
Description copied from class:SpdyHeaders
Adds a new header with the specified name and values. If there is an existing header with the same name, the existing header is removed.- Specified by:
add
in classSpdyHeaders
-
isEmpty
public boolean isEmpty()
Description copied from class:SpdyHeaders
Checks if no header exists.- Specified by:
isEmpty
in classSpdyHeaders
-
-