public class DefaultStompHeaders extends DefaultTextHeaders implements StompHeaders
ACCEPT_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,
Iterable<?> values)
Adds a new header with the specified name and values.
|
StompHeaders |
add(CharSequence name,
Object... values)
Adds a new header with the specified name and values.
|
StompHeaders |
add(CharSequence name,
Object value)
Adds a new header with the specified name and value.
|
StompHeaders |
add(TextHeaders headers)
Adds all header entries of the specified
headers . |
StompHeaders |
clear()
Removes all headers.
|
StompHeaders |
forEachEntry(TextHeaderProcessor processor) |
StompHeaders |
set(CharSequence name,
Iterable<?> values)
Sets a header with the specified name and values.
|
StompHeaders |
set(CharSequence name,
Object... values)
Sets a header with the specified name and values.
|
StompHeaders |
set(CharSequence name,
Object value)
Sets a header with the specified name and value.
|
StompHeaders |
set(TextHeaders headers)
Cleans the current header entries and copies all header entries of the specified
headers . |
contains, contains, contains, convertName, convertValue, entries, get, get, getAll, getAllAndRemove, getAllUnconverted, getAllUnconvertedAndRemove, getAndRemove, getAndRemove, getInt, getInt, getIntAndRemove, getIntAndRemove, getLong, getLong, getLongAndRemove, getLongAndRemove, getTimeMillis, getTimeMillis, getTimeMillisAndRemove, getTimeMillisAndRemove, getUnconverted, getUnconvertedAndRemove, hashCode, isEmpty, iterator, nameEquals, names, remove, size, unconvertedEntries, unconvertedIterator, unconvertedNames, valueEquals
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contains, contains, contains, entries, get, get, getAll, getAllAndRemove, getAllUnconverted, getAllUnconvertedAndRemove, getAndRemove, getAndRemove, getInt, getInt, getIntAndRemove, getIntAndRemove, getLong, getLong, getLongAndRemove, getLongAndRemove, getTimeMillis, getTimeMillis, getTimeMillisAndRemove, getTimeMillisAndRemove, getUnconverted, getUnconvertedAndRemove, isEmpty, iterator, names, remove, size, unconvertedEntries, unconvertedIterator, unconvertedNames
public StompHeaders add(CharSequence name, Object value)
TextHeaders
String
, it is converted
into a String
by Object.toString()
, except in the cases
of Date
and Calendar
, which are formatted to the date
format defined in RFC2616.add
in interface StompHeaders
add
in interface TextHeaders
add
in class DefaultTextHeaders
name
- the name of the header being addedvalue
- the value of the header being addedthis
public StompHeaders add(CharSequence name, Iterable<?> values)
TextHeaders
for (Object v: values) { if (v == null) { break; } headers.add(name, v); }
add
in interface StompHeaders
add
in interface TextHeaders
add
in class DefaultTextHeaders
name
- the name of the headepublic abstract rs being setvalues
- the values of the headers being setthis
public StompHeaders add(CharSequence name, Object... values)
TextHeaders
for (Object v: values) { if (v == null) { break; } headers.add(name, v); }
add
in interface StompHeaders
add
in interface TextHeaders
add
in class DefaultTextHeaders
name
- the name of the headepublic abstract rs being setvalues
- the values of the headers being setthis
public StompHeaders add(TextHeaders headers)
TextHeaders
headers
.add
in interface StompHeaders
add
in interface TextHeaders
add
in class DefaultTextHeaders
this
public StompHeaders set(CharSequence name, Object value)
TextHeaders
String
, it is converted into a
String
by Object.toString()
, except for Date
and Calendar
, which are formatted to the date format defined in
RFC2616.set
in interface StompHeaders
set
in interface TextHeaders
set
in class DefaultTextHeaders
name
- The name of the header being setvalue
- The value of the header being setthis
public StompHeaders set(CharSequence name, Object... values)
TextHeaders
headers.remove(name); for (Object v: values) { if (v == null) { break; } headers.add(name, v); }
set
in interface StompHeaders
set
in interface TextHeaders
set
in class DefaultTextHeaders
name
- the name of the headers being setvalues
- the values of the headers being setthis
public StompHeaders set(CharSequence name, Iterable<?> values)
TextHeaders
headers.remove(name); for (Object v: values) { if (v == null) { break; } headers.add(name, v); }
set
in interface StompHeaders
set
in interface TextHeaders
set
in class DefaultTextHeaders
name
- the name of the headers being setvalues
- the values of the headers being setthis
public StompHeaders set(TextHeaders headers)
TextHeaders
headers
.set
in interface StompHeaders
set
in interface TextHeaders
set
in class DefaultTextHeaders
this
public StompHeaders clear()
TextHeaders
clear
in interface StompHeaders
clear
in interface TextHeaders
clear
in class DefaultTextHeaders
this
public StompHeaders forEachEntry(TextHeaderProcessor processor)
forEachEntry
in interface StompHeaders
forEachEntry
in interface TextHeaders
forEachEntry
in class DefaultTextHeaders
Copyright © 2008–2014 The Netty Project. All rights reserved.