-
- All Superinterfaces:
Headers<CharSequence,CharSequence,Http2Headers>
,Iterable<Map.Entry<CharSequence,CharSequence>>
- All Known Implementing Classes:
DefaultHttp2Headers
,EmptyHttp2Headers
,ReadOnlyHttp2Headers
@UnstableApi public interface Http2Headers extends Headers<CharSequence,CharSequence,Http2Headers>
A collection of headers sent or received via HTTP/2.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Http2Headers.PseudoHeaderName
HTTP/2 pseudo-headers names.
-
Method Summary
-
Methods inherited from interface io.netty5.handler.codec.Headers
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
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
iterator
Iterator<Map.Entry<CharSequence,CharSequence>> iterator()
Returns an iterator over all HTTP/2 headers. The iteration order is as follows: 1. All pseudo headers (order not specified). 2. All non-pseudo headers (in insertion order).- Specified by:
iterator
in interfaceHeaders<CharSequence,CharSequence,Http2Headers>
- Specified by:
iterator
in interfaceIterable<Map.Entry<CharSequence,CharSequence>>
-
valueIterator
Iterator<CharSequence> valueIterator(CharSequence name)
Equivalent toHeaders.getAll(Object)
but no intermediate list is generated.- Parameters:
name
- the name of the header to retrieve- Returns:
- an
Iterator
of header values corresponding toname
.
-
method
Http2Headers method(CharSequence value)
Sets theHttp2Headers.PseudoHeaderName.METHOD
header
-
scheme
Http2Headers scheme(CharSequence value)
Sets theHttp2Headers.PseudoHeaderName.SCHEME
header
-
authority
Http2Headers authority(CharSequence value)
Sets theHttp2Headers.PseudoHeaderName.AUTHORITY
header
-
path
Http2Headers path(CharSequence value)
Sets theHttp2Headers.PseudoHeaderName.PATH
header
-
status
Http2Headers status(CharSequence value)
Sets theHttp2Headers.PseudoHeaderName.STATUS
header
-
method
CharSequence method()
Gets theHttp2Headers.PseudoHeaderName.METHOD
header ornull
if there is no such header
-
scheme
CharSequence scheme()
Gets theHttp2Headers.PseudoHeaderName.SCHEME
header ornull
if there is no such header
-
authority
CharSequence authority()
Gets theHttp2Headers.PseudoHeaderName.AUTHORITY
header ornull
if there is no such header
-
path
CharSequence path()
Gets theHttp2Headers.PseudoHeaderName.PATH
header ornull
if there is no such header
-
status
CharSequence status()
Gets theHttp2Headers.PseudoHeaderName.STATUS
header ornull
if there is no such header
-
contains
boolean contains(CharSequence name, CharSequence value, boolean caseInsensitive)
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.If
caseInsensitive
istrue
then a case insensitive compare is done on the value.- Parameters:
name
- the name of the header to findvalue
- the value of the header to findcaseInsensitive
-true
then a case insensitive compare is run to compare values. otherwise a case sensitive compare is run to compare values.
-
-