public class DefaultHttp2Headers extends DefaultHeaders<CharSequence,CharSequence,Http2Headers> implements Http2Headers
DefaultHeaders.HeaderEntry<K,V>, DefaultHeaders.NameValidator<K>, DefaultHeaders.ValueValidator<V>
Http2Headers.PseudoHeaderName
head
Constructor and Description |
---|
DefaultHttp2Headers()
Create a new instance.
|
DefaultHttp2Headers(boolean validate)
Create a new instance.
|
DefaultHttp2Headers(boolean validate,
boolean validateValues,
int arraySizeHint)
Create a new instance.
|
DefaultHttp2Headers(boolean validate,
int arraySizeHint)
Create a new instance.
|
add, add, add, add, addBoolean, addByte, addChar, addDouble, addFloat, addImpl, addInt, addLong, addObject, addObject, addObject, addShort, addTimeMillis, contains, contains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsShort, containsTimeMillis, copy, 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, nameValidator, remove, set, set, set, set, setAll, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setObject, setObject, setShort, setTimeMillis, size, toString, valueConverter, valueIterator, valueValidator
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
iterator, valueIterator
add, add, add, add, addBoolean, addByte, addChar, addDouble, addFloat, addInt, addLong, addObject, addObject, addObject, addShort, addTimeMillis, 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
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.DefaultHttp2Headers(boolean, boolean, int)
public DefaultHttp2Headers(boolean validate, boolean validateValues, int arraySizeHint)
validate
- true
to validate header names according to
rfc7540. false
to not validate header names.validateValues
- true
to validate header values according to
rfc7230 and
rfc5234. Otherwise, false
(the default) to not validate values.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.protected void validateName(DefaultHeaders.NameValidator<CharSequence> validator, boolean forAdd, CharSequence name)
DefaultHeaders
DefaultHeaders.NameValidator
to validate the given name.validateName
in class DefaultHeaders<CharSequence,CharSequence,Http2Headers>
validator
- the validator to useforAdd
- true
if this validation is for adding to the headers, or false
if this is for
setting (overwriting) the given header.name
- the name to validate.protected void validateValue(DefaultHeaders.ValueValidator<CharSequence> validator, CharSequence name, CharSequence value)
validateValue
in class DefaultHeaders<CharSequence,CharSequence,Http2Headers>
public Http2Headers clear()
Headers
Headers.size()
equals 0
.clear
in interface Headers<CharSequence,CharSequence,Http2Headers>
clear
in class DefaultHeaders<CharSequence,CharSequence,Http2Headers>
this
public boolean equals(Object o)
equals
in class DefaultHeaders<CharSequence,CharSequence,Http2Headers>
public int hashCode()
hashCode
in class DefaultHeaders<CharSequence,CharSequence,Http2Headers>
public Http2Headers method(CharSequence value)
Http2Headers
Http2Headers.PseudoHeaderName.METHOD
headermethod
in interface Http2Headers
public Http2Headers scheme(CharSequence value)
Http2Headers
Http2Headers.PseudoHeaderName.SCHEME
headerscheme
in interface Http2Headers
public Http2Headers authority(CharSequence value)
Http2Headers
Http2Headers.PseudoHeaderName.AUTHORITY
headerauthority
in interface Http2Headers
public Http2Headers path(CharSequence value)
Http2Headers
Http2Headers.PseudoHeaderName.PATH
headerpath
in interface Http2Headers
public Http2Headers status(CharSequence value)
Http2Headers
Http2Headers.PseudoHeaderName.STATUS
headerstatus
in interface Http2Headers
public CharSequence method()
Http2Headers
Http2Headers.PseudoHeaderName.METHOD
header or null
if there is no such headermethod
in interface Http2Headers
public CharSequence scheme()
Http2Headers
Http2Headers.PseudoHeaderName.SCHEME
header or null
if there is no such headerscheme
in interface Http2Headers
public CharSequence authority()
Http2Headers
Http2Headers.PseudoHeaderName.AUTHORITY
header or null
if there is no such headerauthority
in interface Http2Headers
public CharSequence path()
Http2Headers
Http2Headers.PseudoHeaderName.PATH
header or null
if there is no such headerpath
in interface Http2Headers
public CharSequence status()
Http2Headers
Http2Headers.PseudoHeaderName.STATUS
header or null
if there is no such headerstatus
in interface Http2Headers
public boolean contains(CharSequence name, CharSequence value)
Headers
true
if a header with the name
and value
exists, false
otherwise.
The Object.equals(Object)
method is used to test for equality of value
.
contains
in interface Headers<CharSequence,CharSequence,Http2Headers>
contains
in class DefaultHeaders<CharSequence,CharSequence,Http2Headers>
name
- the header namevalue
- the header value of the header to findpublic boolean contains(CharSequence name, CharSequence value, boolean caseInsensitive)
Http2Headers
true
if a header with the name
and value
exists, false
otherwise.
If caseInsensitive
is true
then a case insensitive compare is done on the value.
contains
in interface Http2Headers
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.protected final DefaultHeaders.HeaderEntry<CharSequence,CharSequence> newHeaderEntry(int h, CharSequence name, CharSequence value, DefaultHeaders.HeaderEntry<CharSequence,CharSequence> next)
newHeaderEntry
in class DefaultHeaders<CharSequence,CharSequence,Http2Headers>
Copyright © 2008–2024 The Netty Project. All rights reserved.