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.MutableHttpFieldsNested 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
ConstructorsConstructorDescriptionWebSocketHttpFieldsWrapper(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).booleanonRemoveField(HttpField field) Called when a field is removed (including as part of a put).This method behaves likeHttpFields.Mutable.remove(String)when the givenvalueisnull, otherwise behaves likeHttpFields.Mutable.put(HttpField).Puts a field associated with a list of values.Puts the givenHttpFieldinto this instance.put(HttpHeader header, String value) This method behaves likeHttpFields.Mutable.remove(HttpHeader)when the givenvalueisnull, otherwise behaves likeHttpFields.Mutable.put(HttpField).put(HttpHeader header, HttpHeaderValue value) This method behaves likeHttpFields.Mutable.remove(HttpHeader)when the givenvalueisnull, otherwise behaves likeHttpFields.Mutable.put(HttpField).Methods inherited from class org.eclipse.jetty.http.HttpFields.Mutable.Wrapper
add, clear, listIterator, onReplaceField, size, streamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, listIteratorMethods 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, removeMethods 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.WrapperCalled when a field is added (including as part of a put).- Overrides:
onAddFieldin 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.WrapperCalled when a field is removed (including as part of a put).- Overrides:
onRemoveFieldin 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.MutablePuts the given
HttpFieldinto 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:
putin interfaceHttpFields.Mutable- Overrides:
putin classHttpFields.Mutable.Wrapper- Parameters:
field- the field to put- Returns:
- this instance
-
put
Description copied from interface:HttpFields.MutableThis method behaves like
HttpFields.Mutable.remove(String)when the givenvalueisnull, otherwise behaves likeHttpFields.Mutable.put(HttpField).- Parameters:
name- the name of the fieldvalue- the value of the field; ifnullthe field is removed- Returns:
- this instance
-
put
Description copied from interface:HttpFields.MutableThis method behaves like
HttpFields.Mutable.remove(HttpHeader)when the givenvalueisnull, otherwise behaves likeHttpFields.Mutable.put(HttpField).- Parameters:
header- the name of the fieldvalue- the value of the field; ifnullthe field is removed- Returns:
- this instance
-
put
Description copied from interface:HttpFields.MutableThis method behaves like
HttpFields.Mutable.remove(HttpHeader)when the givenvalueisnull, otherwise behaves likeHttpFields.Mutable.put(HttpField).- Parameters:
header- the name of the fieldvalue- the value of the field; ifnullthe field is removed- Returns:
- this instance
-
put
Description copied from interface:HttpFields.MutablePuts 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
-