@UnstableApi public class DefaultHttp2Headers extends DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers> implements Http2Headers
Modifier and Type | Class and Description |
---|---|
private class |
DefaultHttp2Headers.Http2HeaderEntry |
DefaultHeaders.HeaderEntry<K,V>, DefaultHeaders.NameValidator<K>
Http2Headers.PseudoHeaderName
Modifier and Type | Field and Description |
---|---|
private DefaultHeaders.HeaderEntry<java.lang.CharSequence,java.lang.CharSequence> |
firstNonPseudo |
(package private) static DefaultHeaders.NameValidator<java.lang.CharSequence> |
HTTP2_NAME_VALIDATOR |
private static ByteProcessor |
HTTP2_NAME_VALIDATOR_PROCESSOR |
head
Constructor and Description |
---|
DefaultHttp2Headers()
Create a new instance.
|
DefaultHttp2Headers(boolean validate)
Create a new instance.
|
DefaultHttp2Headers(boolean validate,
int arraySizeHint)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.CharSequence |
authority()
Gets the
Http2Headers.PseudoHeaderName.AUTHORITY header or null if there is no such header |
Http2Headers |
authority(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.AUTHORITY header or null if there is no such header |
Http2Headers |
clear()
Removes all headers.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.CharSequence |
method()
Gets the
Http2Headers.PseudoHeaderName.METHOD header or null if there is no such header |
Http2Headers |
method(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.METHOD header or null if there is no such header |
protected DefaultHeaders.HeaderEntry<java.lang.CharSequence,java.lang.CharSequence> |
newHeaderEntry(int h,
java.lang.CharSequence name,
java.lang.CharSequence value,
DefaultHeaders.HeaderEntry<java.lang.CharSequence,java.lang.CharSequence> next) |
java.lang.CharSequence |
path()
Gets the
Http2Headers.PseudoHeaderName.PATH header or null if there is no such header |
Http2Headers |
path(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.PATH header or null if there is no such header |
java.lang.CharSequence |
scheme()
Gets the
Http2Headers.PseudoHeaderName.SCHEME header or null if there is no such header |
Http2Headers |
scheme(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.SCHEME header if there is no such header |
java.lang.CharSequence |
status()
Gets the
Http2Headers.PseudoHeaderName.STATUS header or null if there is no such header |
Http2Headers |
status(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.STATUS header or null if there is no such header |
add, add, add, add, addBoolean, addByte, addChar, addDouble, addFloat, addImpl, addInt, addLong, addObject, addObject, addObject, addShort, addTimeMillis, contains, contains, contains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsShort, containsTimeMillis, equals, 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, hashCode, isEmpty, iterator, names, remove, set, set, set, set, setAll, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setObject, setObject, setShort, setTimeMillis, size, toString, valueConverter
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
iterator
add, add, add, add, addBoolean, addByte, addChar, addDouble, addFloat, addInt, addLong, addObject, addObject, addObject, addShort, addTimeMillis, 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
private static final ByteProcessor HTTP2_NAME_VALIDATOR_PROCESSOR
static final DefaultHeaders.NameValidator<java.lang.CharSequence> HTTP2_NAME_VALIDATOR
private DefaultHeaders.HeaderEntry<java.lang.CharSequence,java.lang.CharSequence> firstNonPseudo
public DefaultHttp2Headers()
Header names will be validated according to rfc7540.
public DefaultHttp2Headers(boolean validate)
validate
- true
to validate header names according to
rfc7540. false
to not validate header names.public DefaultHttp2Headers(boolean validate, int arraySizeHint)
validate
- true
to validate header names according to
rfc7540. false
to not validate header names.arraySizeHint
- A hint as to how large the hash data structure should be.
The next positive power of two will be used. An upper bound may be enforced.public Http2Headers clear()
Headers
Headers.size()
equals 0
.clear
in interface Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>
clear
in class DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>
this
public boolean equals(java.lang.Object o)
equals
in class DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>
public int hashCode()
hashCode
in class DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>
public Http2Headers method(java.lang.CharSequence value)
Http2Headers
Http2Headers.PseudoHeaderName.METHOD
header or null
if there is no such headermethod
in interface Http2Headers
public Http2Headers scheme(java.lang.CharSequence value)
Http2Headers
Http2Headers.PseudoHeaderName.SCHEME
header if there is no such headerscheme
in interface Http2Headers
public Http2Headers authority(java.lang.CharSequence value)
Http2Headers
Http2Headers.PseudoHeaderName.AUTHORITY
header or null
if there is no such headerauthority
in interface Http2Headers
public Http2Headers path(java.lang.CharSequence value)
Http2Headers
Http2Headers.PseudoHeaderName.PATH
header or null
if there is no such headerpath
in interface Http2Headers
public Http2Headers status(java.lang.CharSequence value)
Http2Headers
Http2Headers.PseudoHeaderName.STATUS
header or null
if there is no such headerstatus
in interface Http2Headers
public java.lang.CharSequence method()
Http2Headers
Http2Headers.PseudoHeaderName.METHOD
header or null
if there is no such headermethod
in interface Http2Headers
public java.lang.CharSequence scheme()
Http2Headers
Http2Headers.PseudoHeaderName.SCHEME
header or null
if there is no such headerscheme
in interface Http2Headers
public java.lang.CharSequence authority()
Http2Headers
Http2Headers.PseudoHeaderName.AUTHORITY
header or null
if there is no such headerauthority
in interface Http2Headers
public java.lang.CharSequence path()
Http2Headers
Http2Headers.PseudoHeaderName.PATH
header or null
if there is no such headerpath
in interface Http2Headers
public java.lang.CharSequence status()
Http2Headers
Http2Headers.PseudoHeaderName.STATUS
header or null
if there is no such headerstatus
in interface Http2Headers
protected final DefaultHeaders.HeaderEntry<java.lang.CharSequence,java.lang.CharSequence> newHeaderEntry(int h, java.lang.CharSequence name, java.lang.CharSequence value, DefaultHeaders.HeaderEntry<java.lang.CharSequence,java.lang.CharSequence> next)
newHeaderEntry
in class DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>