Package io.netty.handler.codec.http2
Interface Http2Headers
-
- All Superinterfaces:
Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>,java.lang.Iterable<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>>
- All Known Implementing Classes:
DefaultHttp2Headers,EmptyHttp2Headers,ReadOnlyHttp2Headers
public interface Http2Headers extends Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>
A collection of headers sent or received via HTTP/2.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classHttp2Headers.PseudoHeaderNameHTTP/2 pseudo-headers names.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.CharSequenceauthority()Gets theHttp2Headers.PseudoHeaderName.AUTHORITYheader ornullif there is no such headerHttp2Headersauthority(java.lang.CharSequence value)Sets theHttp2Headers.PseudoHeaderName.AUTHORITYheaderbooleancontains(java.lang.CharSequence name, java.lang.CharSequence value, boolean caseInsensitive)Returnstrueif a header with thenameandvalueexists,falseotherwise.java.util.Iterator<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>>iterator()Returns an iterator over all HTTP/2 headers.java.lang.CharSequencemethod()Gets theHttp2Headers.PseudoHeaderName.METHODheader ornullif there is no such headerHttp2Headersmethod(java.lang.CharSequence value)Sets theHttp2Headers.PseudoHeaderName.METHODheaderjava.lang.CharSequencepath()Gets theHttp2Headers.PseudoHeaderName.PATHheader ornullif there is no such headerHttp2Headerspath(java.lang.CharSequence value)Sets theHttp2Headers.PseudoHeaderName.PATHheaderjava.lang.CharSequencescheme()Gets theHttp2Headers.PseudoHeaderName.SCHEMEheader ornullif there is no such headerHttp2Headersscheme(java.lang.CharSequence value)Sets theHttp2Headers.PseudoHeaderName.SCHEMEheaderjava.lang.CharSequencestatus()Gets theHttp2Headers.PseudoHeaderName.STATUSheader ornullif there is no such headerHttp2Headersstatus(java.lang.CharSequence value)Sets theHttp2Headers.PseudoHeaderName.STATUSheaderjava.util.Iterator<java.lang.CharSequence>valueIterator(java.lang.CharSequence name)Equivalent toHeaders.getAll(Object)but no intermediate list is generated.-
Methods inherited from interface io.netty.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
-
-
-
-
Method Detail
-
iterator
java.util.Iterator<java.util.Map.Entry<java.lang.CharSequence,java.lang.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:
iteratorin interfaceHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>- Specified by:
iteratorin interfacejava.lang.Iterable<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>>
-
valueIterator
java.util.Iterator<java.lang.CharSequence> valueIterator(java.lang.CharSequence name)
Equivalent toHeaders.getAll(Object)but no intermediate list is generated.- Parameters:
name- the name of the header to retrieve- Returns:
- an
Iteratorof header values corresponding toname.
-
method
Http2Headers method(java.lang.CharSequence value)
Sets theHttp2Headers.PseudoHeaderName.METHODheader
-
scheme
Http2Headers scheme(java.lang.CharSequence value)
Sets theHttp2Headers.PseudoHeaderName.SCHEMEheader
-
authority
Http2Headers authority(java.lang.CharSequence value)
Sets theHttp2Headers.PseudoHeaderName.AUTHORITYheader
-
path
Http2Headers path(java.lang.CharSequence value)
Sets theHttp2Headers.PseudoHeaderName.PATHheader
-
status
Http2Headers status(java.lang.CharSequence value)
Sets theHttp2Headers.PseudoHeaderName.STATUSheader
-
method
java.lang.CharSequence method()
Gets theHttp2Headers.PseudoHeaderName.METHODheader ornullif there is no such header
-
scheme
java.lang.CharSequence scheme()
Gets theHttp2Headers.PseudoHeaderName.SCHEMEheader ornullif there is no such header
-
authority
java.lang.CharSequence authority()
Gets theHttp2Headers.PseudoHeaderName.AUTHORITYheader ornullif there is no such header
-
path
java.lang.CharSequence path()
Gets theHttp2Headers.PseudoHeaderName.PATHheader ornullif there is no such header
-
status
java.lang.CharSequence status()
Gets theHttp2Headers.PseudoHeaderName.STATUSheader ornullif there is no such header
-
contains
boolean contains(java.lang.CharSequence name, java.lang.CharSequence value, boolean caseInsensitive)Returnstrueif a header with thenameandvalueexists,falseotherwise.If
caseInsensitiveistruethen 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-truethen a case insensitive compare is run to compare values. otherwise a case sensitive compare is run to compare values.
-
-