| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultHeaders.HeaderDateFormat
This
DateFormat decodes 3 formats of Date. |
protected static class |
DefaultHeaders.HeaderEntry<T> |
static interface |
DefaultHeaders.NameValidator<T> |
| Modifier and Type | Field and Description |
|---|---|
protected DefaultHeaders.HeaderEntry<T> |
head |
| Constructor and Description |
|---|
DefaultHeaders(io.netty.util.HashingStrategy<T> nameHashingStrategy,
ValueConverter<T> valueConverter) |
DefaultHeaders(io.netty.util.HashingStrategy<T> nameHashingStrategy,
ValueConverter<T> valueConverter,
DefaultHeaders.NameValidator<T> nameValidator) |
DefaultHeaders(ValueConverter<T> valueConverter) |
DefaultHeaders(ValueConverter<T> valueConverter,
DefaultHeaders.NameValidator<T> nameValidator) |
| Modifier and Type | Method and Description |
|---|---|
Headers<T> |
add(Headers<? extends T> headers)
Adds all header names and values of
headers to this object. |
Headers<T> |
add(T name,
Iterable<? extends T> values)
Adds new headers with the specified
name and values. |
Headers<T> |
add(T name,
T... values)
Adds new headers with the specified
name and values. |
Headers<T> |
add(T name,
T value)
Adds a new header with the specified
name and value. |
Headers<T> |
addBoolean(T name,
boolean value)
Adds a new header.
|
Headers<T> |
addByte(T name,
byte value)
Adds a new header.
|
Headers<T> |
addChar(T name,
char value)
Adds a new header.
|
Headers<T> |
addDouble(T name,
double value)
Adds a new header.
|
Headers<T> |
addFloat(T name,
float value)
Adds a new header.
|
Headers<T> |
addInt(T name,
int value)
Adds a new header.
|
Headers<T> |
addLong(T name,
long value)
Adds a new header.
|
Headers<T> |
addObject(T name,
Iterable<?> values)
Adds a new header with the specified name and values.
|
Headers<T> |
addObject(T name,
Object... values)
Adds a new header with the specified name and values.
|
Headers<T> |
addObject(T name,
Object value)
Adds a new header.
|
Headers<T> |
addShort(T name,
short value)
Adds a new header.
|
Headers<T> |
addTimeMillis(T name,
long value)
Adds a new header.
|
Headers<T> |
clear()
Removes all headers.
|
boolean |
contains(T name)
Returns
true if a header with the name exists, false otherwise. |
boolean |
contains(T name,
T value)
Returns
true if a header with the name and value exists, false otherwise. |
boolean |
contains(T name,
T value,
io.netty.util.HashingStrategy<? super T> valueHashingStrategy) |
boolean |
containsBoolean(T name,
boolean value)
Returns
true if a header with the name and value exists. |
boolean |
containsByte(T name,
byte value)
Returns
true if a header with the name and value exists. |
boolean |
containsChar(T name,
char value)
Returns
true if a header with the name and value exists. |
boolean |
containsDouble(T name,
double value)
Returns
true if a header with the name and value exists. |
boolean |
containsFloat(T name,
float value)
Returns
true if a header with the name and value exists. |
boolean |
containsInt(T name,
int value)
Returns
true if a header with the name and value exists. |
boolean |
containsLong(T name,
long value)
Returns
true if a header with the name and value exists. |
boolean |
containsObject(T name,
Object value)
Returns
true if a header with the name and value exists. |
boolean |
containsShort(T name,
short value)
Returns
true if a header with the name and value exists. |
boolean |
containsTimeMillis(T name,
long value)
Returns
true if a header with the name and value exists. |
boolean |
equals(Headers<T> h2,
io.netty.util.HashingStrategy<T> valueHashingStrategy)
Test this object for equality against
h2. |
boolean |
equals(Object o) |
T |
get(T name)
Returns the value of a header with the specified name.
|
T |
get(T name,
T defaultValue)
Returns the value of a header with the specified name.
|
List<T> |
getAll(T name)
Returns all values for the header with the specified name.
|
List<T> |
getAllAndRemove(T name)
Returns all values for the header with the specified name and removes them from this object.
|
T |
getAndRemove(T name)
Returns the value of a header with the specified name and removes it from this object.
|
T |
getAndRemove(T name,
T defaultValue)
Returns the value of a header with the specified name and removes it from this object.
|
Boolean |
getBoolean(T name)
Returns the
boolean value of a header with the specified name. |
boolean |
getBoolean(T name,
boolean defaultValue)
Returns the
boolean value of a header with the specified name. |
Boolean |
getBooleanAndRemove(T name)
Returns the
boolean value of a header with the specified name and removes the header from this
object. |
boolean |
getBooleanAndRemove(T name,
boolean defaultValue)
Returns the
boolean value of a header with the specified name and removes the header from this
object. |
Byte |
getByte(T name)
Returns the
byte value of a header with the specified name. |
byte |
getByte(T name,
byte defaultValue)
Returns the
byte value of a header with the specified name. |
Byte |
getByteAndRemove(T name)
Returns the
byte value of a header with the specified name and removes the header from this
object. |
byte |
getByteAndRemove(T name,
byte defaultValue)
Returns the
byte value of a header with the specified name and removes the header from this
object. |
Character |
getChar(T name)
Returns the
char value of a header with the specified name. |
char |
getChar(T name,
char defaultValue)
Returns the
char value of a header with the specified name. |
Character |
getCharAndRemove(T name)
Returns the
char value of a header with the specified name and removes the header from this
object. |
char |
getCharAndRemove(T name,
char defaultValue)
Returns the
char value of a header with the specified name and removes the header from this
object. |
Double |
getDouble(T name)
Returns the
double value of a header with the specified name. |
double |
getDouble(T name,
double defaultValue)
Returns the
double value of a header with the specified name. |
Double |
getDoubleAndRemove(T name)
Returns the
double value of a header with the specified name and removes the header from this
object. |
double |
getDoubleAndRemove(T name,
double defaultValue)
Returns the
double value of a header with the specified name and removes the header from this
object. |
Float |
getFloat(T name)
Returns the
float value of a header with the specified name. |
float |
getFloat(T name,
float defaultValue)
Returns the
float value of a header with the specified name. |
Float |
getFloatAndRemove(T name)
Returns the
float value of a header with the specified name and removes the header from this
object. |
float |
getFloatAndRemove(T name,
float defaultValue)
Returns the
float value of a header with the specified name and removes the header from this
object. |
Integer |
getInt(T name)
Returns the
int value of a header with the specified name. |
int |
getInt(T name,
int defaultValue)
Returns the
int value of a header with the specified name. |
Integer |
getIntAndRemove(T name)
Returns the
int value of a header with the specified name and removes the header from this
object. |
int |
getIntAndRemove(T name,
int defaultValue)
Returns the
int value of a header with the specified name and removes the header from this
object. |
Long |
getLong(T name)
Returns the
long value of a header with the specified name. |
long |
getLong(T name,
long defaultValue)
Returns the
long value of a header with the specified name. |
Long |
getLongAndRemove(T name)
Returns the
long value of a header with the specified name and removes the header from this
object. |
long |
getLongAndRemove(T name,
long defaultValue)
Returns the
long value of a header with the specified name and removes the header from this
object. |
Short |
getShort(T name)
Returns the
short value of a header with the specified name. |
short |
getShort(T name,
short defaultValue)
Returns the
short value of a header with the specified name. |
Short |
getShortAndRemove(T name)
Returns the
short value of a header with the specified name and removes the header from this
object. |
short |
getShortAndRemove(T name,
short defaultValue)
Returns the
short value of a header with the specified name and removes the header from this
object. |
Long |
getTimeMillis(T name)
Returns the value of a header with the specified name in milliseconds.
|
long |
getTimeMillis(T name,
long defaultValue)
Returns the value of a header with the specified name in milliseconds.
|
Long |
getTimeMillisAndRemove(T name)
Returns the value of a header with the specified
name in milliseconds and removes the header from this
object. |
long |
getTimeMillisAndRemove(T name,
long defaultValue)
Returns the value of a header with the specified
name in milliseconds and removes the header from this
object. |
int |
hashCode() |
int |
hashCode(io.netty.util.HashingStrategy<T> valueHashingStrategy)
Generate a hash code for this object given a
HashingStrategy to generate hash codes for
individual values. |
boolean |
isEmpty()
|
Iterator<Map.Entry<T,T>> |
iterator() |
Set<T> |
names()
Returns a
Set of all header names in this object. |
protected DefaultHeaders.HeaderEntry<T> |
newHeaderEntry(int h,
T name,
T value,
DefaultHeaders.HeaderEntry<T> next) |
boolean |
remove(T name)
Removes all headers with the specified
name. |
Headers<T> |
set(Headers<? extends T> headers)
Clears the current header entries and copies all header entries of the specified
headers. |
Headers<T> |
set(T name,
Iterable<? extends T> values)
Sets a new header with the specified name and values.
|
Headers<T> |
set(T name,
T... values)
Sets a header with the specified name and values.
|
Headers<T> |
set(T name,
T value)
Sets a header with the specified name and value.
|
Headers<T> |
setAll(Headers<? extends T> headers)
Retains all current headers but calls
#set(T, T) for each entry in headers. |
Headers<T> |
setBoolean(T name,
boolean value)
Set the
name to value. |
Headers<T> |
setByte(T name,
byte value)
Set the
name to value. |
Headers<T> |
setChar(T name,
char value)
Set the
name to value. |
Headers<T> |
setDouble(T name,
double value)
Set the
name to value. |
Headers<T> |
setFloat(T name,
float value)
Set the
name to value. |
Headers<T> |
setInt(T name,
int value)
Set the
name to value. |
Headers<T> |
setLong(T name,
long value)
Set the
name to value. |
Headers<T> |
setObject(T name,
Iterable<?> values)
Sets a header with the specified name and values.
|
Headers<T> |
setObject(T name,
Object... values)
Sets a header with the specified name and values.
|
Headers<T> |
setObject(T name,
Object value)
Sets a new header.
|
Headers<T> |
setShort(T name,
short value)
Set the
name to value. |
Headers<T> |
setTimeMillis(T name,
long value)
Set the
name to value. |
int |
size()
Returns the number of headers in this object.
|
String |
toString() |
protected ValueConverter<T> |
valueConverter() |
protected final DefaultHeaders.HeaderEntry<T> head
public DefaultHeaders(ValueConverter<T> valueConverter)
public DefaultHeaders(ValueConverter<T> valueConverter, DefaultHeaders.NameValidator<T> nameValidator)
public DefaultHeaders(io.netty.util.HashingStrategy<T> nameHashingStrategy, ValueConverter<T> valueConverter)
public DefaultHeaders(io.netty.util.HashingStrategy<T> nameHashingStrategy, ValueConverter<T> valueConverter, DefaultHeaders.NameValidator<T> nameValidator)
public T get(T name)
Headerspublic T get(T name, T defaultValue)
Headerspublic T getAndRemove(T name)
HeadersgetAndRemove in interface Headers<T>name - the name of the header to retrievenull if there is no such headerpublic T getAndRemove(T name, T defaultValue)
HeadersgetAndRemove in interface Headers<T>name - the name of the header to retrievedefaultValue - the default valuedefaultValue if there is no such headerpublic List<T> getAll(T name)
HeadersList can't be modified.public List<T> getAllAndRemove(T name)
HeadersList can't be modified.getAllAndRemove in interface Headers<T>name - the name of the header to retrieveList of header values or an empty List if no values are found.public boolean contains(T name)
Headerstrue if a header with the name exists, false otherwise.public boolean containsObject(T name, Object value)
Headerstrue if a header with the name and value exists.containsObject in interface Headers<T>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsBoolean(T name, boolean value)
Headerstrue if a header with the name and value exists.containsBoolean in interface Headers<T>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsByte(T name, byte value)
Headerstrue if a header with the name and value exists.containsByte in interface Headers<T>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsChar(T name, char value)
Headerstrue if a header with the name and value exists.containsChar in interface Headers<T>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsShort(T name, short value)
Headerstrue if a header with the name and value exists.containsShort in interface Headers<T>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsInt(T name, int value)
Headerstrue if a header with the name and value exists.containsInt in interface Headers<T>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsLong(T name, long value)
Headerstrue if a header with the name and value exists.containsLong in interface Headers<T>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsFloat(T name, float value)
Headerstrue if a header with the name and value exists.containsFloat in interface Headers<T>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsDouble(T name, double value)
Headerstrue if a header with the name and value exists.containsDouble in interface Headers<T>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsTimeMillis(T name, long value)
Headerstrue if a header with the name and value exists.containsTimeMillis in interface Headers<T>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean contains(T name, T value)
Headerstrue if a header with the name and value exists, false otherwise.
The Object.equals(Object) method is used to test for equality of value.
public final boolean contains(T name, T value, io.netty.util.HashingStrategy<? super T> valueHashingStrategy)
public int size()
Headerspublic boolean isEmpty()
Headerspublic Headers<T> add(T name, T value)
Headersname and value.public Headers<T> add(T name, Iterable<? extends T> values)
Headersname and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
public Headers<T> add(T name, T... values)
Headersname and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
public Headers<T> addObject(T name, Object value)
Headersvalue is added, it's converted to type T.public Headers<T> addObject(T name, Iterable<?> values)
Headers
for (Object v : values) {
headers.addObject(name, v);
}
public Headers<T> addObject(T name, Object... values)
Headers
for (Object v : values) {
headers.addObject(name, v);
}
public Headers<T> addInt(T name, int value)
Headerspublic Headers<T> addLong(T name, long value)
Headerspublic Headers<T> addDouble(T name, double value)
Headerspublic Headers<T> addTimeMillis(T name, long value)
HeadersaddTimeMillis in interface Headers<T>name - the header namevalue - the value of the headerthispublic Headers<T> addChar(T name, char value)
Headerspublic Headers<T> addBoolean(T name, boolean value)
HeadersaddBoolean in interface Headers<T>name - the header namevalue - the value of the headerthispublic Headers<T> addFloat(T name, float value)
Headerspublic Headers<T> addByte(T name, byte value)
Headerspublic Headers<T> addShort(T name, short value)
Headerspublic Headers<T> add(Headers<? extends T> headers)
Headersheaders to this object.public Headers<T> set(T name, T value)
Headerspublic Headers<T> set(T name, Iterable<? extends T> values)
Headers
for (T v : values) {
headers.addObject(name, v);
}
public Headers<T> set(T name, T... values)
Headers
headers.remove(name);
for (T v : values) {
headers.add(name, v);
}
public Headers<T> setObject(T name, Object value)
Headersvalue is add, it's
converted to type T.public Headers<T> setObject(T name, Iterable<?> values)
Headers
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
public Headers<T> setObject(T name, Object... values)
Headers
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
public Headers<T> setInt(T name, int value)
Headersname to value. This will remove all previous values associated with name.public Headers<T> setLong(T name, long value)
Headersname to value. This will remove all previous values associated with name.public Headers<T> setDouble(T name, double value)
Headersname to value. This will remove all previous values associated with name.public Headers<T> setTimeMillis(T name, long value)
Headersname to value. This will remove all previous values associated with name.setTimeMillis in interface Headers<T>name - The name to modifyvalue - The valuethispublic Headers<T> setFloat(T name, float value)
Headersname to value. This will remove all previous values associated with name.public Headers<T> setChar(T name, char value)
Headersname to value. This will remove all previous values associated with name.public Headers<T> setBoolean(T name, boolean value)
Headersname to value. This will remove all previous values associated with name.setBoolean in interface Headers<T>name - The name to modifyvalue - The valuethispublic Headers<T> setByte(T name, byte value)
Headersname to value. This will remove all previous values associated with name.public Headers<T> setShort(T name, short value)
Headersname to value. This will remove all previous values associated with name.public Headers<T> set(Headers<? extends T> headers)
Headersheaders.public Headers<T> setAll(Headers<? extends T> headers)
Headers#set(T, T) for each entry in headers.public boolean remove(T name)
Headersname.public Headers<T> clear()
HeadersHeaders.size() equals 0.public Boolean getBoolean(T name)
Headersboolean value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getBoolean in interface Headers<T>name - the name of the header to retrieveboolean value of the first value in insertion order or null if there is no such
value or it can't be converted to boolean.public boolean getBoolean(T name, boolean defaultValue)
Headersboolean value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getBoolean in interface Headers<T>name - the name of the header to retrievedefaultValue - the default valueboolean value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to boolean.public Byte getByte(T name)
Headersbyte value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public byte getByte(T name, byte defaultValue)
Headersbyte value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public Character getChar(T name)
Headerschar value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public char getChar(T name, char defaultValue)
Headerschar value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public Short getShort(T name)
Headersshort value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public short getShort(T name, short defaultValue)
Headersshort value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public Integer getInt(T name)
Headersint value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public int getInt(T name, int defaultValue)
Headersint value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public Long getLong(T name)
Headerslong value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public long getLong(T name, long defaultValue)
Headerslong value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public Float getFloat(T name)
Headersfloat value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public float getFloat(T name, float defaultValue)
Headersfloat value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public Double getDouble(T name)
Headersdouble value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public double getDouble(T name, double defaultValue)
Headersdouble value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public Long getTimeMillis(T name)
HeadersgetTimeMillis in interface Headers<T>name - the name of the header to retrievenull if there is no such
value or it can't be converted to milliseconds.public long getTimeMillis(T name, long defaultValue)
HeadersgetTimeMillis in interface Headers<T>name - the name of the header to retrievedefaultValue - the default valuedefaultValue if there is no such
value or it can't be converted to milliseconds.public Boolean getBooleanAndRemove(T name)
Headersboolean value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getBooleanAndRemove in interface Headers<T>name - the name of the header to retrieveboolean value of the first value in insertion order or null if there is no
such value or it can't be converted to boolean.public boolean getBooleanAndRemove(T name, boolean defaultValue)
Headersboolean value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getBooleanAndRemove in interface Headers<T>name - the name of the header to searchdefaultValue - the default valueboolean value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to boolean.public Byte getByteAndRemove(T name)
Headersbyte value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getByteAndRemove in interface Headers<T>name - the name of the header to searchbyte value of the first value in insertion order or null if there is no
such value or it can't be converted to byte.public byte getByteAndRemove(T name, byte defaultValue)
Headersbyte value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getByteAndRemove in interface Headers<T>name - the name of the header to searchdefaultValue - the default valuebyte value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to byte.public Character getCharAndRemove(T name)
Headerschar value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getCharAndRemove in interface Headers<T>name - the name of the header to searchchar value of the first value in insertion order or null if there is no
such value or it can't be converted to char.public char getCharAndRemove(T name, char defaultValue)
Headerschar value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getCharAndRemove in interface Headers<T>name - the name of the header to searchdefaultValue - the default valuechar value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to char.public Short getShortAndRemove(T name)
Headersshort value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getShortAndRemove in interface Headers<T>name - the name of the header to searchshort value of the first value in insertion order or null if there is no
such value or it can't be converted to short.public short getShortAndRemove(T name, short defaultValue)
Headersshort value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getShortAndRemove in interface Headers<T>name - the name of the header to searchdefaultValue - the default valueshort value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to short.public Integer getIntAndRemove(T name)
Headersint value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getIntAndRemove in interface Headers<T>name - the name of the header to searchint value of the first value in insertion order or null if there is no
such value or it can't be converted to int.public int getIntAndRemove(T name, int defaultValue)
Headersint value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getIntAndRemove in interface Headers<T>name - the name of the header to searchdefaultValue - the default valueint value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to int.public Long getLongAndRemove(T name)
Headerslong value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getLongAndRemove in interface Headers<T>name - the name of the header to searchlong value of the first value in insertion order or null if there is no
such value or it can't be converted to long.public long getLongAndRemove(T name, long defaultValue)
Headerslong value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getLongAndRemove in interface Headers<T>name - the name of the header to searchdefaultValue - the default valuelong value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to long.public Float getFloatAndRemove(T name)
Headersfloat value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getFloatAndRemove in interface Headers<T>name - the name of the header to searchfloat value of the first value in insertion order or null if there is no
such value or it can't be converted to float.public float getFloatAndRemove(T name, float defaultValue)
Headersfloat value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getFloatAndRemove in interface Headers<T>name - the name of the header to searchdefaultValue - the default valuefloat value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to float.public Double getDoubleAndRemove(T name)
Headersdouble value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getDoubleAndRemove in interface Headers<T>name - the name of the header to searchdouble value of the first value in insertion order or null if there is no
such value or it can't be converted to double.public double getDoubleAndRemove(T name, double defaultValue)
Headersdouble value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getDoubleAndRemove in interface Headers<T>name - the name of the header to searchdefaultValue - the default valuedouble value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to double.public Long getTimeMillisAndRemove(T name)
Headersname in milliseconds and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is
returned. In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getTimeMillisAndRemove in interface Headers<T>name - the name of the header to retrievenull if there is no such
value or it can't be converted to milliseconds.public long getTimeMillisAndRemove(T name, long defaultValue)
Headersname in milliseconds and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is
returned. In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getTimeMillisAndRemove in interface Headers<T>name - the name of the header to retrievedefaultValue - the default valuedefaultValue if there is no such
value or it can't be converted to milliseconds.public final boolean equals(Headers<T> h2, io.netty.util.HashingStrategy<T> valueHashingStrategy)
h2.h2 - The object to check equality for.valueHashingStrategy - Defines how values will be compared for equality.true if this object equals h2 given valueHashingStrategy.
false otherwise.public final int hashCode(io.netty.util.HashingStrategy<T> valueHashingStrategy)
HashingStrategy to generate hash codes for
individual values.valueHashingStrategy - Defines how values will be hashed.protected DefaultHeaders.HeaderEntry<T> newHeaderEntry(int h, T name, T value, DefaultHeaders.HeaderEntry<T> next)
protected ValueConverter<T> valueConverter()
Copyright © 2008–2015 The Netty Project. All rights reserved.