Package io.netty.handler.codec.http3
Class DefaultHttp3Headers
- java.lang.Object
-
- io.netty.handler.codec.DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http3Headers>
-
- io.netty.handler.codec.http3.DefaultHttp3Headers
-
- All Implemented Interfaces:
Headers<java.lang.CharSequence,java.lang.CharSequence,Http3Headers>
,Http3Headers
,java.lang.Iterable<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>>
public final class DefaultHttp3Headers extends DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http3Headers> implements Http3Headers
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.netty.handler.codec.DefaultHeaders
DefaultHeaders.HeaderEntry<K,V>, DefaultHeaders.NameValidator<K>, DefaultHeaders.ValueValidator<V>
-
Nested classes/interfaces inherited from interface io.netty.handler.codec.http3.Http3Headers
Http3Headers.PseudoHeaderName
-
-
Field Summary
-
Fields inherited from class io.netty.handler.codec.DefaultHeaders
head
-
-
Constructor Summary
Constructors Constructor Description DefaultHttp3Headers()
Create a new instance.DefaultHttp3Headers(boolean validate)
Create a new instance.DefaultHttp3Headers(boolean validate, int arraySizeHint)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.CharSequence
authority()
Gets theHttp3Headers.PseudoHeaderName.AUTHORITY
header ornull
if there is no such headerHttp3Headers
authority(java.lang.CharSequence value)
Sets theHttp3Headers.PseudoHeaderName.AUTHORITY
headerHttp3Headers
clear()
Removes all headers.boolean
contains(java.lang.CharSequence name, java.lang.CharSequence value)
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.boolean
contains(java.lang.CharSequence name, java.lang.CharSequence value, boolean caseInsensitive)
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.boolean
equals(java.lang.Object o)
int
hashCode()
java.lang.CharSequence
method()
Gets theHttp3Headers.PseudoHeaderName.METHOD
header ornull
if there is no such headerHttp3Headers
method(java.lang.CharSequence value)
Sets theHttp3Headers.PseudoHeaderName.METHOD
headerprotected 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 theHttp3Headers.PseudoHeaderName.PATH
header ornull
if there is no such headerHttp3Headers
path(java.lang.CharSequence value)
Sets theHttp3Headers.PseudoHeaderName.PATH
headerjava.lang.CharSequence
scheme()
Gets theHttp3Headers.PseudoHeaderName.SCHEME
header ornull
if there is no such headerHttp3Headers
scheme(java.lang.CharSequence value)
Sets theHttp3Headers.PseudoHeaderName.SCHEME
headerjava.lang.CharSequence
status()
Gets theHttp3Headers.PseudoHeaderName.STATUS
header ornull
if there is no such headerHttp3Headers
status(java.lang.CharSequence value)
Sets theHttp3Headers.PseudoHeaderName.STATUS
header-
Methods inherited from class io.netty.handler.codec.DefaultHeaders
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, validateName, validateValue, valueConverter, valueIterator, valueValidator
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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, 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 io.netty.handler.codec.http3.Http3Headers
iterator, valueIterator
-
-
-
-
Constructor Detail
-
DefaultHttp3Headers
public DefaultHttp3Headers()
Create a new instance.Header names will be validated according to rfc7540.
-
DefaultHttp3Headers
public DefaultHttp3Headers(boolean validate)
Create a new instance.- Parameters:
validate
-true
to validate header names according to rfc7540.false
to not validate header names.
-
DefaultHttp3Headers
public DefaultHttp3Headers(boolean validate, int arraySizeHint)
Create a new instance.- Parameters:
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.
-
-
Method Detail
-
clear
public Http3Headers clear()
Description copied from interface:Headers
Removes all headers. After a call to this methodHeaders.size()
equals0
.- Specified by:
clear
in interfaceHeaders<java.lang.CharSequence,java.lang.CharSequence,Http3Headers>
- Overrides:
clear
in classDefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http3Headers>
- Returns:
this
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classDefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http3Headers>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classDefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http3Headers>
-
method
public Http3Headers method(java.lang.CharSequence value)
Description copied from interface:Http3Headers
Sets theHttp3Headers.PseudoHeaderName.METHOD
header- Specified by:
method
in interfaceHttp3Headers
- Parameters:
value
- the value for the header.- Returns:
- this instance itself.
-
scheme
public Http3Headers scheme(java.lang.CharSequence value)
Description copied from interface:Http3Headers
Sets theHttp3Headers.PseudoHeaderName.SCHEME
header- Specified by:
scheme
in interfaceHttp3Headers
- Parameters:
value
- the value for the header.- Returns:
- this instance itself.
-
authority
public Http3Headers authority(java.lang.CharSequence value)
Description copied from interface:Http3Headers
Sets theHttp3Headers.PseudoHeaderName.AUTHORITY
header- Specified by:
authority
in interfaceHttp3Headers
- Parameters:
value
- the value for the header.- Returns:
- this instance itself.
-
path
public Http3Headers path(java.lang.CharSequence value)
Description copied from interface:Http3Headers
Sets theHttp3Headers.PseudoHeaderName.PATH
header- Specified by:
path
in interfaceHttp3Headers
- Parameters:
value
- the value for the header.- Returns:
- this instance itself.
-
status
public Http3Headers status(java.lang.CharSequence value)
Description copied from interface:Http3Headers
Sets theHttp3Headers.PseudoHeaderName.STATUS
header- Specified by:
status
in interfaceHttp3Headers
- Parameters:
value
- the value for the header.- Returns:
- this instance itself.
-
method
public java.lang.CharSequence method()
Description copied from interface:Http3Headers
Gets theHttp3Headers.PseudoHeaderName.METHOD
header ornull
if there is no such header- Specified by:
method
in interfaceHttp3Headers
- Returns:
- the value of the header.
-
scheme
public java.lang.CharSequence scheme()
Description copied from interface:Http3Headers
Gets theHttp3Headers.PseudoHeaderName.SCHEME
header ornull
if there is no such header- Specified by:
scheme
in interfaceHttp3Headers
- Returns:
- the value of the header.
-
authority
public java.lang.CharSequence authority()
Description copied from interface:Http3Headers
Gets theHttp3Headers.PseudoHeaderName.AUTHORITY
header ornull
if there is no such header- Specified by:
authority
in interfaceHttp3Headers
- Returns:
- the value of the header.
-
path
public java.lang.CharSequence path()
Description copied from interface:Http3Headers
Gets theHttp3Headers.PseudoHeaderName.PATH
header ornull
if there is no such header- Specified by:
path
in interfaceHttp3Headers
- Returns:
- the value of the header.
-
status
public java.lang.CharSequence status()
Description copied from interface:Http3Headers
Gets theHttp3Headers.PseudoHeaderName.STATUS
header ornull
if there is no such header- Specified by:
status
in interfaceHttp3Headers
- Returns:
- the value of the header.
-
contains
public boolean contains(java.lang.CharSequence name, java.lang.CharSequence value)
Description copied from interface:Headers
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.The
Object.equals(Object)
method is used to test for equality ofvalue
.- Specified by:
contains
in interfaceHeaders<java.lang.CharSequence,java.lang.CharSequence,Http3Headers>
- Overrides:
contains
in classDefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http3Headers>
- Parameters:
name
- the header namevalue
- the header value of the header to find
-
contains
public boolean contains(java.lang.CharSequence name, java.lang.CharSequence value, boolean caseInsensitive)
Description copied from interface:Http3Headers
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.If
caseInsensitive
istrue
then a case insensitive compare is done on the value.- Specified by:
contains
in interfaceHttp3Headers
- 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.- Returns:
true
if its contained,false
otherwise.
-
newHeaderEntry
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)
- Overrides:
newHeaderEntry
in classDefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http3Headers>
-
-