Class WebSocketHttpFieldsWrapper
- All Implemented Interfaces:
Iterable<HttpField>
,Supplier<HttpFields>
,HttpFields
,HttpFields.Mutable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.http.HttpFields
HttpFields.ImmutableHttpFields, HttpFields.Mutable, HttpFields.MutableHttpFields
Nested classes/interfaces inherited from interface org.eclipse.jetty.http.HttpFields.Mutable
HttpFields.Mutable.Wrapper
-
Field Summary
Fields inherited from interface org.eclipse.jetty.http.HttpFields
CONNECTION_CLOSE, CONNECTION_KEEPALIVE, CONTENT_LENGTH_0, EMPTY, EXPIRES_01JAN1970
-
Constructor Summary
ConstructorDescriptionWebSocketHttpFieldsWrapper
(HttpFields.Mutable fields, ServerUpgradeResponse response, WebSocketNegotiation negotiation) -
Method Summary
Modifier and TypeMethodDescriptiononAddField
(HttpField field) Called when a field is added (including as part of a put).boolean
onRemoveField
(HttpField field) Called when a field is removed (including as part of a put).This method behaves likeHttpFields.Mutable.remove(String)
when the givenvalue
isnull
, otherwise behaves likeHttpFields.Mutable.put(HttpField)
.Puts a field associated with a list of values.Puts the givenHttpField
into this instance.put
(HttpHeader header, String value) This method behaves likeHttpFields.Mutable.remove(HttpHeader)
when the givenvalue
isnull
, otherwise behaves likeHttpFields.Mutable.put(HttpField)
.put
(HttpHeader header, HttpHeaderValue value) This method behaves likeHttpFields.Mutable.remove(HttpHeader)
when the givenvalue
isnull
, otherwise behaves likeHttpFields.Mutable.put(HttpField)
.Methods inherited from class org.eclipse.jetty.http.HttpFields.Mutable.Wrapper
add, clear, listIterator, onReplaceField, size, stream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.http.HttpFields
asImmutable, asString, contains, contains, contains, contains, contains, contains, containsLast, get, get, get, getCSV, getCSV, getDateField, getDateField, getField, getField, getField, getFieldNames, getFieldNamesCollection, getFields, getFields, getLast, getLongField, getLongField, getQualityCSV, getQualityCSV, getQualityCSV, getValues, getValuesList, getValuesList, isEqualTo, iterator, listIterator
Methods inherited from interface org.eclipse.jetty.http.HttpFields.Mutable
add, add, add, add, add, add, add, addCSV, addCSV, addDateField, computeField, computeField, ensureField, put, put, putDate, putDate, remove, remove, remove
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
WebSocketHttpFieldsWrapper
public WebSocketHttpFieldsWrapper(HttpFields.Mutable fields, ServerUpgradeResponse response, WebSocketNegotiation negotiation)
-
-
Method Details
-
onAddField
Description copied from class:HttpFields.Mutable.Wrapper
Called when a field is added (including as part of a put).- Overrides:
onAddField
in classHttpFields.Mutable.Wrapper
- Parameters:
field
- The field being added.- Returns:
- The field to add, or null if the add is to be ignored.
-
onRemoveField
Description copied from class:HttpFields.Mutable.Wrapper
Called when a field is removed (including as part of a put).- Overrides:
onRemoveField
in classHttpFields.Mutable.Wrapper
- Parameters:
field
- The field being removed.- Returns:
- True if the field should be removed, false otherwise.
-
put
Description copied from interface:HttpFields.Mutable
Puts the given
HttpField
into this instance.If a fields with the same name is present, the given field replaces it, and other existing fields with the same name are removed, so that only the given field will be present.
If a field with the same name is not present, the given field will be added.
- Specified by:
put
in interfaceHttpFields.Mutable
- Overrides:
put
in classHttpFields.Mutable.Wrapper
- Parameters:
field
- the field to put- Returns:
- this instance
-
put
Description copied from interface:HttpFields.Mutable
This method behaves like
HttpFields.Mutable.remove(String)
when the givenvalue
isnull
, otherwise behaves likeHttpFields.Mutable.put(HttpField)
.- Parameters:
name
- the name of the fieldvalue
- the value of the field; ifnull
the field is removed- Returns:
- this instance
-
put
Description copied from interface:HttpFields.Mutable
This method behaves like
HttpFields.Mutable.remove(HttpHeader)
when the givenvalue
isnull
, otherwise behaves likeHttpFields.Mutable.put(HttpField)
.- Parameters:
header
- the name of the fieldvalue
- the value of the field; ifnull
the field is removed- Returns:
- this instance
-
put
Description copied from interface:HttpFields.Mutable
This method behaves like
HttpFields.Mutable.remove(HttpHeader)
when the givenvalue
isnull
, otherwise behaves likeHttpFields.Mutable.put(HttpField)
.- Parameters:
header
- the name of the fieldvalue
- the value of the field; ifnull
the field is removed- Returns:
- this instance
-
put
Description copied from interface:HttpFields.Mutable
Puts a field associated with a list of values.
- Parameters:
name
- the name of the fieldlist
- the List value of the field. If null the field is cleared.- Returns:
- this builder
-