Package io.netty.handler.codec.http2
Class DefaultHttp2Headers
- java.lang.Object
-
- io.netty.handler.codec.DefaultHeaders<CharSequence,CharSequence,Http2Headers>
-
- io.netty.handler.codec.http2.DefaultHttp2Headers
-
- All Implemented Interfaces:
io.netty.handler.codec.Headers<CharSequence,CharSequence,Http2Headers>,Http2Headers,Iterable<Map.Entry<CharSequence,CharSequence>>
public class DefaultHttp2Headers extends io.netty.handler.codec.DefaultHeaders<CharSequence,CharSequence,Http2Headers> implements Http2Headers
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.netty.handler.codec.DefaultHeaders
io.netty.handler.codec.DefaultHeaders.HeaderEntry<K extends Object,V extends Object>, io.netty.handler.codec.DefaultHeaders.NameValidator<K extends Object>, io.netty.handler.codec.DefaultHeaders.ValueValidator<V extends Object>
-
Nested classes/interfaces inherited from interface io.netty.handler.codec.http2.Http2Headers
Http2Headers.PseudoHeaderName
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharSequenceauthority()Gets theHttp2Headers.PseudoHeaderName.AUTHORITYheader ornullif there is no such headerHttp2Headersauthority(CharSequence value)Sets theHttp2Headers.PseudoHeaderName.AUTHORITYheaderHttp2Headersclear()booleancontains(CharSequence name, CharSequence value)booleancontains(CharSequence name, CharSequence value, boolean caseInsensitive)Returnstrueif a header with thenameandvalueexists,falseotherwise.booleanequals(Object o)inthashCode()CharSequencemethod()Gets theHttp2Headers.PseudoHeaderName.METHODheader ornullif there is no such headerHttp2Headersmethod(CharSequence value)Sets theHttp2Headers.PseudoHeaderName.METHODheaderprotected io.netty.handler.codec.DefaultHeaders.HeaderEntry<CharSequence,CharSequence>newHeaderEntry(int h, CharSequence name, CharSequence value, io.netty.handler.codec.DefaultHeaders.HeaderEntry<CharSequence,CharSequence> next)CharSequencepath()Gets theHttp2Headers.PseudoHeaderName.PATHheader ornullif there is no such headerHttp2Headerspath(CharSequence value)Sets theHttp2Headers.PseudoHeaderName.PATHheaderCharSequencescheme()Gets theHttp2Headers.PseudoHeaderName.SCHEMEheader ornullif there is no such headerHttp2Headersscheme(CharSequence value)Sets theHttp2Headers.PseudoHeaderName.SCHEMEheaderCharSequencestatus()Gets theHttp2Headers.PseudoHeaderName.STATUSheader ornullif there is no such headerHttp2Headersstatus(CharSequence value)Sets theHttp2Headers.PseudoHeaderName.STATUSheaderprotected voidvalidateName(io.netty.handler.codec.DefaultHeaders.NameValidator<CharSequence> validator, boolean forAdd, CharSequence name)protected voidvalidateValue(io.netty.handler.codec.DefaultHeaders.ValueValidator<CharSequence> validator, CharSequence name, CharSequence value)-
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, 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.http2.Http2Headers
iterator, valueIterator
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
DefaultHttp2Headers
public DefaultHttp2Headers()
Create a new instance.Header names will be validated according to rfc7540.
-
DefaultHttp2Headers
public DefaultHttp2Headers(boolean validate)
Create a new instance.- Parameters:
validate-trueto validate header names according to rfc7540.falseto not validate header names.
-
DefaultHttp2Headers
public DefaultHttp2Headers(boolean validate, int arraySizeHint)Create a new instance.- Parameters:
validate-trueto validate header names according to rfc7540.falseto 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.- See Also:
DefaultHttp2Headers(boolean, boolean, int)
-
DefaultHttp2Headers
public DefaultHttp2Headers(boolean validate, boolean validateValues, int arraySizeHint)Create a new instance.- Parameters:
validate-trueto validate header names according to rfc7540.falseto not validate header names.validateValues-trueto 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.
-
-
Method Detail
-
validateName
protected void validateName(io.netty.handler.codec.DefaultHeaders.NameValidator<CharSequence> validator, boolean forAdd, CharSequence name)
- Overrides:
validateNamein classio.netty.handler.codec.DefaultHeaders<CharSequence,CharSequence,Http2Headers>
-
validateValue
protected void validateValue(io.netty.handler.codec.DefaultHeaders.ValueValidator<CharSequence> validator, CharSequence name, CharSequence value)
- Overrides:
validateValuein classio.netty.handler.codec.DefaultHeaders<CharSequence,CharSequence,Http2Headers>
-
clear
public Http2Headers clear()
- Specified by:
clearin interfaceio.netty.handler.codec.Headers<CharSequence,CharSequence,Http2Headers>- Overrides:
clearin classio.netty.handler.codec.DefaultHeaders<CharSequence,CharSequence,Http2Headers>
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classio.netty.handler.codec.DefaultHeaders<CharSequence,CharSequence,Http2Headers>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classio.netty.handler.codec.DefaultHeaders<CharSequence,CharSequence,Http2Headers>
-
method
public Http2Headers method(CharSequence value)
Description copied from interface:Http2HeadersSets theHttp2Headers.PseudoHeaderName.METHODheader- Specified by:
methodin interfaceHttp2Headers
-
scheme
public Http2Headers scheme(CharSequence value)
Description copied from interface:Http2HeadersSets theHttp2Headers.PseudoHeaderName.SCHEMEheader- Specified by:
schemein interfaceHttp2Headers
-
authority
public Http2Headers authority(CharSequence value)
Description copied from interface:Http2HeadersSets theHttp2Headers.PseudoHeaderName.AUTHORITYheader- Specified by:
authorityin interfaceHttp2Headers
-
path
public Http2Headers path(CharSequence value)
Description copied from interface:Http2HeadersSets theHttp2Headers.PseudoHeaderName.PATHheader- Specified by:
pathin interfaceHttp2Headers
-
status
public Http2Headers status(CharSequence value)
Description copied from interface:Http2HeadersSets theHttp2Headers.PseudoHeaderName.STATUSheader- Specified by:
statusin interfaceHttp2Headers
-
method
public CharSequence method()
Description copied from interface:Http2HeadersGets theHttp2Headers.PseudoHeaderName.METHODheader ornullif there is no such header- Specified by:
methodin interfaceHttp2Headers
-
scheme
public CharSequence scheme()
Description copied from interface:Http2HeadersGets theHttp2Headers.PseudoHeaderName.SCHEMEheader ornullif there is no such header- Specified by:
schemein interfaceHttp2Headers
-
authority
public CharSequence authority()
Description copied from interface:Http2HeadersGets theHttp2Headers.PseudoHeaderName.AUTHORITYheader ornullif there is no such header- Specified by:
authorityin interfaceHttp2Headers
-
path
public CharSequence path()
Description copied from interface:Http2HeadersGets theHttp2Headers.PseudoHeaderName.PATHheader ornullif there is no such header- Specified by:
pathin interfaceHttp2Headers
-
status
public CharSequence status()
Description copied from interface:Http2HeadersGets theHttp2Headers.PseudoHeaderName.STATUSheader ornullif there is no such header- Specified by:
statusin interfaceHttp2Headers
-
contains
public boolean contains(CharSequence name, CharSequence value)
- Specified by:
containsin interfaceio.netty.handler.codec.Headers<CharSequence,CharSequence,Http2Headers>- Overrides:
containsin classio.netty.handler.codec.DefaultHeaders<CharSequence,CharSequence,Http2Headers>
-
contains
public boolean contains(CharSequence name, CharSequence value, boolean caseInsensitive)
Description copied from interface:Http2HeadersReturnstrueif a header with thenameandvalueexists,falseotherwise.If
caseInsensitiveistruethen a case insensitive compare is done on the value.- Specified by:
containsin interfaceHttp2Headers- 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.
-
newHeaderEntry
protected final io.netty.handler.codec.DefaultHeaders.HeaderEntry<CharSequence,CharSequence> newHeaderEntry(int h, CharSequence name, CharSequence value, io.netty.handler.codec.DefaultHeaders.HeaderEntry<CharSequence,CharSequence> next)
- Overrides:
newHeaderEntryin classio.netty.handler.codec.DefaultHeaders<CharSequence,CharSequence,Http2Headers>
-
-