public class DefaultStompHeaders extends DefaultHeaders<CharSequence> implements StompHeaders
DefaultHeaders.HeaderDateFormat, DefaultHeaders.HeaderEntry<T>, DefaultHeaders.NameValidator<T>headACCEPT_VERSION, ACK, CONTENT_LENGTH, CONTENT_TYPE, DESTINATION, HEART_BEAT, HOST, ID, LOGIN, MESSAGE, MESSAGE_ID, PASSCODE, RECEIPT, RECEIPT_ID, SERVER, SESSION, SUBSCRIPTION, TRANSACTION, VERSION| Constructor and Description |
|---|
DefaultStompHeaders() |
| Modifier and Type | Method and Description |
|---|---|
StompHeaders |
add(CharSequence name,
CharSequence... values)
Adds new headers with the specified
name and values. |
StompHeaders |
add(CharSequence name,
CharSequence value)
Adds a new header with the specified
name and value. |
StompHeaders |
add(CharSequence name,
Iterable<? extends CharSequence> values)
Adds new headers with the specified
name and values. |
StompHeaders |
add(Headers<? extends CharSequence> headers)
Adds all header names and values of
headers to this object. |
StompHeaders |
addBoolean(CharSequence name,
boolean value)
Adds a new header.
|
StompHeaders |
addByte(CharSequence name,
byte value)
Adds a new header.
|
StompHeaders |
addChar(CharSequence name,
char value)
Adds a new header.
|
StompHeaders |
addDouble(CharSequence name,
double value)
Adds a new header.
|
StompHeaders |
addFloat(CharSequence name,
float value)
Adds a new header.
|
StompHeaders |
addInt(CharSequence name,
int value)
Adds a new header.
|
StompHeaders |
addLong(CharSequence name,
long value)
Adds a new header.
|
StompHeaders |
addObject(CharSequence name,
Iterable<?> values)
Adds a new header with the specified name and values.
|
StompHeaders |
addObject(CharSequence name,
Object... values)
Adds a new header with the specified name and values.
|
StompHeaders |
addObject(CharSequence name,
Object value)
Adds a new header.
|
StompHeaders |
addShort(CharSequence name,
short value)
Adds a new header.
|
StompHeaders |
addTimeMillis(CharSequence name,
long value)
Adds a new header.
|
StompHeaders |
clear()
Removes all headers.
|
boolean |
contains(CharSequence name,
CharSequence value)
Returns
true if a header with the name and value exists, false otherwise. |
boolean |
contains(CharSequence name,
CharSequence value,
boolean ignoreCase)
Returns
true if a header with the name and value exists, false otherwise. |
List<String> |
getAllAsString(CharSequence name)
|
String |
getAsString(CharSequence name)
Headers.get(Object) and convert the result to a String. |
Iterator<Map.Entry<String,String>> |
iteratorAsString()
|
StompHeaders |
set(CharSequence name,
CharSequence... values)
Sets a header with the specified name and values.
|
StompHeaders |
set(CharSequence name,
CharSequence value)
Sets a header with the specified name and value.
|
StompHeaders |
set(CharSequence name,
Iterable<? extends CharSequence> values)
Sets a new header with the specified name and values.
|
StompHeaders |
set(Headers<? extends CharSequence> headers)
Clears the current header entries and copies all header entries of the specified
headers. |
StompHeaders |
setAll(Headers<? extends CharSequence> headers)
Retains all current headers but calls
#set(T, T) for each entry in headers. |
StompHeaders |
setBoolean(CharSequence name,
boolean value)
Set the
name to value. |
StompHeaders |
setByte(CharSequence name,
byte value)
Set the
name to value. |
StompHeaders |
setChar(CharSequence name,
char value)
Set the
name to value. |
StompHeaders |
setDouble(CharSequence name,
double value)
Set the
name to value. |
StompHeaders |
setFloat(CharSequence name,
float value)
Set the
name to value. |
StompHeaders |
setInt(CharSequence name,
int value)
Set the
name to value. |
StompHeaders |
setLong(CharSequence name,
long value)
Set the
name to value. |
StompHeaders |
setObject(CharSequence name,
Iterable<?> values)
Sets a header with the specified name and values.
|
StompHeaders |
setObject(CharSequence name,
Object... values)
Sets a header with the specified name and values.
|
StompHeaders |
setObject(CharSequence name,
Object value)
Sets a new header.
|
StompHeaders |
setShort(CharSequence name,
short value)
Set the
name to value. |
StompHeaders |
setTimeMillis(CharSequence name,
long value)
Set the
name to value. |
contains, contains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsShort, containsTimeMillis, equals, 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, hashCode, isEmpty, iterator, names, newHeaderEntry, remove, size, toString, valueConverterclone, finalize, getClass, notify, notifyAll, wait, wait, waitcontains, 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, iterator, names, remove, sizepublic StompHeaders add(CharSequence name, CharSequence value)
Headersname and value.add in interface Headers<CharSequence>add in interface StompHeadersadd in class DefaultHeaders<CharSequence>name - the name of the headervalue - the value of the headerthispublic StompHeaders add(CharSequence name, Iterable<? extends CharSequence> values)
Headersname and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
add in interface Headers<CharSequence>add in interface StompHeadersadd in class DefaultHeaders<CharSequence>name - the header namevalues - the values of the headerthispublic StompHeaders add(CharSequence name, CharSequence... values)
Headersname and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
add in interface Headers<CharSequence>add in interface StompHeadersadd in class DefaultHeaders<CharSequence>name - the header namevalues - the values of the headerthispublic StompHeaders addObject(CharSequence name, Object value)
Headersvalue is added, it's converted to type T.addObject in interface Headers<CharSequence>addObject in interface StompHeadersaddObject in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders addObject(CharSequence name, Iterable<?> values)
Headers
for (Object v : values) {
headers.addObject(name, v);
}
addObject in interface Headers<CharSequence>addObject in interface StompHeadersaddObject in class DefaultHeaders<CharSequence>name - the header namevalues - the value of the headerthispublic StompHeaders addObject(CharSequence name, Object... values)
Headers
for (Object v : values) {
headers.addObject(name, v);
}
addObject in interface Headers<CharSequence>addObject in interface StompHeadersaddObject in class DefaultHeaders<CharSequence>name - the header namevalues - the value of the headerthispublic StompHeaders addBoolean(CharSequence name, boolean value)
HeadersaddBoolean in interface Headers<CharSequence>addBoolean in interface StompHeadersaddBoolean in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders addChar(CharSequence name, char value)
HeadersaddChar in interface Headers<CharSequence>addChar in interface StompHeadersaddChar in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders addByte(CharSequence name, byte value)
HeadersaddByte in interface Headers<CharSequence>addByte in interface StompHeadersaddByte in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders addShort(CharSequence name, short value)
HeadersaddShort in interface Headers<CharSequence>addShort in interface StompHeadersaddShort in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders addInt(CharSequence name, int value)
HeadersaddInt in interface Headers<CharSequence>addInt in interface StompHeadersaddInt in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders addLong(CharSequence name, long value)
HeadersaddLong in interface Headers<CharSequence>addLong in interface StompHeadersaddLong in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders addFloat(CharSequence name, float value)
HeadersaddFloat in interface Headers<CharSequence>addFloat in interface StompHeadersaddFloat in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders addDouble(CharSequence name, double value)
HeadersaddDouble in interface Headers<CharSequence>addDouble in interface StompHeadersaddDouble in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders addTimeMillis(CharSequence name, long value)
HeadersaddTimeMillis in interface Headers<CharSequence>addTimeMillis in interface StompHeadersaddTimeMillis in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders add(Headers<? extends CharSequence> headers)
Headersheaders to this object.add in interface Headers<CharSequence>add in interface StompHeadersadd in class DefaultHeaders<CharSequence>thispublic StompHeaders set(CharSequence name, CharSequence value)
Headersset in interface Headers<CharSequence>set in interface StompHeadersset in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders set(CharSequence name, Iterable<? extends CharSequence> values)
Headers
for (T v : values) {
headers.addObject(name, v);
}
set in interface Headers<CharSequence>set in interface StompHeadersset in class DefaultHeaders<CharSequence>name - the header namevalues - the value of the headerthispublic StompHeaders set(CharSequence name, CharSequence... values)
Headers
headers.remove(name);
for (T v : values) {
headers.add(name, v);
}
set in interface Headers<CharSequence>set in interface StompHeadersset in class DefaultHeaders<CharSequence>name - the header namevalues - the value of the headerthispublic StompHeaders setObject(CharSequence name, Object value)
Headersvalue is add, it's
converted to type T.setObject in interface Headers<CharSequence>setObject in interface StompHeaderssetObject in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic StompHeaders setObject(CharSequence name, Iterable<?> values)
Headers
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
setObject in interface Headers<CharSequence>setObject in interface StompHeaderssetObject in class DefaultHeaders<CharSequence>name - the header namevalues - the values of the headerthispublic StompHeaders setObject(CharSequence name, Object... values)
Headers
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
setObject in interface Headers<CharSequence>setObject in interface StompHeaderssetObject in class DefaultHeaders<CharSequence>name - the header namevalues - the values of the headerthispublic StompHeaders setBoolean(CharSequence name, boolean value)
Headersname to value. This will remove all previous values associated with name.setBoolean in interface Headers<CharSequence>setBoolean in interface StompHeaderssetBoolean in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic StompHeaders setChar(CharSequence name, char value)
Headersname to value. This will remove all previous values associated with name.setChar in interface Headers<CharSequence>setChar in interface StompHeaderssetChar in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic StompHeaders setByte(CharSequence name, byte value)
Headersname to value. This will remove all previous values associated with name.setByte in interface Headers<CharSequence>setByte in interface StompHeaderssetByte in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic StompHeaders setShort(CharSequence name, short value)
Headersname to value. This will remove all previous values associated with name.setShort in interface Headers<CharSequence>setShort in interface StompHeaderssetShort in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic StompHeaders setInt(CharSequence name, int value)
Headersname to value. This will remove all previous values associated with name.setInt in interface Headers<CharSequence>setInt in interface StompHeaderssetInt in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic StompHeaders setLong(CharSequence name, long value)
Headersname to value. This will remove all previous values associated with name.setLong in interface Headers<CharSequence>setLong in interface StompHeaderssetLong in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic StompHeaders setFloat(CharSequence name, float value)
Headersname to value. This will remove all previous values associated with name.setFloat in interface Headers<CharSequence>setFloat in interface StompHeaderssetFloat in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic StompHeaders setDouble(CharSequence name, double value)
Headersname to value. This will remove all previous values associated with name.setDouble in interface Headers<CharSequence>setDouble in interface StompHeaderssetDouble in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic StompHeaders setTimeMillis(CharSequence name, long value)
Headersname to value. This will remove all previous values associated with name.setTimeMillis in interface Headers<CharSequence>setTimeMillis in interface StompHeaderssetTimeMillis in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic StompHeaders set(Headers<? extends CharSequence> headers)
Headersheaders.set in interface Headers<CharSequence>set in interface StompHeadersset in class DefaultHeaders<CharSequence>thispublic StompHeaders setAll(Headers<? extends CharSequence> headers)
Headers#set(T, T) for each entry in headers.setAll in interface Headers<CharSequence>setAll in interface StompHeaderssetAll in class DefaultHeaders<CharSequence>headers - The headers used to #set(T, T) values in this instancethispublic StompHeaders clear()
HeadersHeaders.size() equals 0.clear in interface Headers<CharSequence>clear in interface StompHeadersclear in class DefaultHeaders<CharSequence>thispublic String getAsString(CharSequence name)
StompHeadersHeaders.get(Object) and convert the result to a String.getAsString in interface StompHeadersname - the name of the header to retrievenull if there's no such header.public List<String> getAllAsString(CharSequence name)
StompHeadersgetAllAsString in interface StompHeadersname - the name of the header to retrieveList of header values or an empty List if no values are found.public Iterator<Map.Entry<String,String>> iteratorAsString()
StompHeadersiteratorAsString in interface StompHeaderspublic boolean contains(CharSequence name, CharSequence 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.
contains in interface Headers<CharSequence>contains in class DefaultHeaders<CharSequence>name - the header namevalue - the header value of the header to findpublic boolean contains(CharSequence name, CharSequence value, boolean ignoreCase)
StompHeaderstrue if a header with the name and value exists, false otherwise.
If ignoreCase is true then a case insensitive compare is done on the value.
contains in interface StompHeadersname - the name of the header to findvalue - the value of the header to findignoreCase - true then a case insensitive compare is run to compare values.
otherwise a case sensitive compare is run to compare values.Copyright © 2008–2015 The Netty Project. All rights reserved.