public interface HttpHeaders extends HttpObject, Headers<AsciiString,String,HttpHeaders>
Modifier and Type | Field and Description |
---|---|
static HttpHeaders |
EMPTY_HEADERS
An immutable empty HTTP/2 headers.
|
Modifier and Type | Method and Description |
---|---|
default HttpHeaders |
asImmutable()
Returns the immutable view of this headers.
|
String |
authority()
Gets the
HttpHeaderNames.AUTHORITY header or null if there is no such header. |
HttpHeaders |
authority(String authority)
Sets the
HttpHeaderNames.AUTHORITY header. |
static HttpHeaders |
copyOf(HttpHeaders headers)
Returns a copy of the specified
HttpHeaders . |
Iterator<Map.Entry<AsciiString,String>> |
iterator()
Returns an iterator over all HTTP/2 headers.
|
HttpMethod |
method()
Gets the
HttpHeaderNames.METHOD header or null if there is no such header. |
HttpHeaders |
method(HttpMethod method)
Sets the
HttpHeaderNames.METHOD header. |
static HttpHeaders |
of()
Returns new empty HTTP headers.
|
static HttpHeaders |
of(AsciiString name,
String value)
Returns new HTTP headers with a single entry.
|
static HttpHeaders |
of(AsciiString name1,
String value1,
AsciiString name2,
String value2)
Returns new HTTP headers with two entries.
|
static HttpHeaders |
of(AsciiString name1,
String value1,
AsciiString name2,
String value2,
AsciiString name3,
String value3)
Returns new HTTP headers with three entries.
|
static HttpHeaders |
of(AsciiString name1,
String value1,
AsciiString name2,
String value2,
AsciiString name3,
String value3,
AsciiString name4,
String value4)
Returns new HTTP headers with four entries.
|
static HttpHeaders |
of(HttpMethod method,
String path)
Returns new HTTP request headers.
|
static HttpHeaders |
of(HttpStatus status)
Returns new HTTP response headers.
|
static HttpHeaders |
of(int statusCode)
Returns new HTTP response headers.
|
String |
path()
Gets the
HttpHeaderNames.PATH header or null if there is no such header. |
HttpHeaders |
path(String path)
Sets the
HttpHeaderNames.PATH header. |
String |
scheme()
Gets the
HttpHeaderNames.SCHEME header or null if there is no such header. |
HttpHeaders |
scheme(String scheme)
Sets the
HttpHeaderNames.SCHEME header. |
HttpStatus |
status()
Gets the
HttpHeaderNames.STATUS header or null if there is no such header. |
HttpHeaders |
status(HttpStatus status)
Sets the
HttpHeaderNames.STATUS header. |
HttpHeaders |
status(int statusCode)
Sets the
HttpHeaderNames.STATUS header. |
isEndOfStream
add, add, add, add, addBoolean, addByte, addChar, addDouble, addFloat, addInt, addLong, addObject, addObject, addObject, addShort, addTimeMillis, clear, contains, contains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsShort, containsTimeMillis, get, get, getAll, getAllAndRemove, getAndRemove, getAndRemove, getBoolean, getBoolean, getBooleanAndRemove, getBooleanAndRemove, getByte, getByte, getByteAndRemove, getByteAndRemove, getChar, getChar, getCharAndRemove, getCharAndRemove, getDouble, getDouble, getDoubleAndRemove, getDoubleAndRemove, getFloat, getFloat, getFloatAndRemove, getFloatAndRemove, getInt, getInt, getIntAndRemove, getIntAndRemove, getLong, getLong, getLongAndRemove, getLongAndRemove, getShort, getShort, getShortAndRemove, getShortAndRemove, getTimeMillis, getTimeMillis, getTimeMillisAndRemove, getTimeMillisAndRemove, isEmpty, names, remove, set, set, set, set, setAll, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setObject, setObject, setShort, setTimeMillis, size
forEach, spliterator
static final HttpHeaders EMPTY_HEADERS
static HttpHeaders of()
static HttpHeaders of(HttpMethod method, String path)
static HttpHeaders of(int statusCode)
static HttpHeaders of(HttpStatus status)
static HttpHeaders of(AsciiString name, String value)
static HttpHeaders of(AsciiString name1, String value1, AsciiString name2, String value2)
static HttpHeaders of(AsciiString name1, String value1, AsciiString name2, String value2, AsciiString name3, String value3)
static HttpHeaders of(AsciiString name1, String value1, AsciiString name2, String value2, AsciiString name3, String value3, AsciiString name4, String value4)
static HttpHeaders copyOf(HttpHeaders headers)
HttpHeaders
.Iterator<Map.Entry<AsciiString,String>> iterator()
iterator
in interface Headers<AsciiString,String,HttpHeaders>
iterator
in interface Iterable<Map.Entry<AsciiString,String>>
HttpMethod method()
HttpHeaderNames.METHOD
header or null
if there is no such header.HttpHeaders method(HttpMethod method)
HttpHeaderNames.METHOD
header.String scheme()
HttpHeaderNames.SCHEME
header or null
if there is no such header.HttpHeaders scheme(String scheme)
HttpHeaderNames.SCHEME
header.String authority()
HttpHeaderNames.AUTHORITY
header or null
if there is no such header.HttpHeaders authority(String authority)
HttpHeaderNames.AUTHORITY
header.String path()
HttpHeaderNames.PATH
header or null
if there is no such header.HttpHeaders path(String path)
HttpHeaderNames.PATH
header.@Nullable HttpStatus status()
HttpHeaderNames.STATUS
header or null
if there is no such header.HttpHeaders status(int statusCode)
HttpHeaderNames.STATUS
header.HttpHeaders status(HttpStatus status)
HttpHeaderNames.STATUS
header.default HttpHeaders asImmutable()
© Copyright 2015–2017 LINE Corporation. All rights reserved.