Top Fields Constructors Methods
org.eclipse.jetty.websocket.core.server.internal

public Class WebSocketHttpFieldsWrapper

extends Wrapper
Class Inheritance
Imports
java.util.Collections, .List, org.eclipse.jetty.http.HttpField, .HttpFields, .HttpHeader, .HttpHeaderValue, org.eclipse.jetty.websocket.core.ExtensionConfig, org.eclipse.jetty.websocket.core.server.ServerUpgradeResponse

Field Summary

Modifier and TypeField and Description
private final ServerUpgradeResponse

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public HttpField
onAddField(HttpField
The field being added.
field
)

Overrides org.eclipse.jetty.http.HttpFields.Mutable.Wrapper.onAddField.

Called when a field is added (including as part of a put).

public boolean
onRemoveField(HttpField
The field being removed.
field
)

Overrides org.eclipse.jetty.http.HttpFields.Mutable.Wrapper.onRemoveField.

Called when a field is removed (including as part of a put).

public HttpFields.Mutable
put(HttpField
the field to put
field
)

Overrides org.eclipse.jetty.http.HttpFields.Mutable.Wrapper.put.

Overrides default org.eclipse.jetty.http.HttpFields.Mutable.put.

Puts the given HttpField into this instance.

public HttpFields.Mutable
put(String
the name of the field
name
,
String
the value of the field; if null the field is removed
value
)

Overrides default org.eclipse.jetty.http.HttpFields.Mutable.put.

This method behaves like remove(String) when the given value is null, otherwise behaves like put(HttpField).

public HttpFields.Mutable
put(HttpHeader
the name of the field
header
,
HttpHeaderValue
the value of the field; if null the field is removed
value
)

Overrides default org.eclipse.jetty.http.HttpFields.Mutable.put.

This method behaves like remove(HttpHeader) when the given value is null, otherwise behaves like put(HttpField).

public HttpFields.Mutable
put(HttpHeader
the name of the field
header
,
String
the value of the field; if null the field is removed
value
)

Overrides default org.eclipse.jetty.http.HttpFields.Mutable.put.

This method behaves like remove(HttpHeader) when the given value is null, otherwise behaves like put(HttpField).

public HttpFields.Mutable
put(String
the name of the field
name
,
List<String>
the List value of the field. If null the field is cleared.
list
)

Overrides default org.eclipse.jetty.http.HttpFields.Mutable.put.

Puts a field associated with a list of values.

Inherited from org.eclipse.jetty.http.HttpFields.Mutable.Wrapper:
addclearlistIteratoronReplaceFieldsizestream

Field Detail

_responseback to summary
private final ServerUpgradeResponse _response

Constructor Detail

WebSocketHttpFieldsWrapperback to summary
public WebSocketHttpFieldsWrapper(HttpFields.Mutable fields, ServerUpgradeResponse response, WebSocketNegotiation negotiation)

Method Detail

onAddFieldback to summary
public HttpField onAddField(HttpField field)

Overrides org.eclipse.jetty.http.HttpFields.Mutable.Wrapper.onAddField.

Doc from org.eclipse.jetty.http.HttpFields.Mutable.Wrapper.onAddField.

Called when a field is added (including as part of a put).

Parameters
field:HttpField

The field being added.

Returns:HttpField

The field to add, or null if the add is to be ignored.

Annotations
@Override
onRemoveFieldback to summary
public boolean onRemoveField(HttpField field)

Overrides org.eclipse.jetty.http.HttpFields.Mutable.Wrapper.onRemoveField.

Doc from org.eclipse.jetty.http.HttpFields.Mutable.Wrapper.onRemoveField.

Called when a field is removed (including as part of a put).

Parameters
field:HttpField

The field being removed.

Returns:boolean

True if the field should be removed, false otherwise.

Annotations
@Override
putback to summary
public HttpFields.Mutable put(HttpField field)

Overrides org.eclipse.jetty.http.HttpFields.Mutable.Wrapper.put.

Overrides default org.eclipse.jetty.http.HttpFields.Mutable.put.

Doc from org.eclipse.jetty.http.HttpFields.Mutable.put.

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.

Parameters
field:HttpField

the field to put

Returns:HttpFields.Mutable

this instance

Annotations
@Override
putback to summary
public HttpFields.Mutable put(String name, String value)

Overrides default org.eclipse.jetty.http.HttpFields.Mutable.put.

Doc from org.eclipse.jetty.http.HttpFields.Mutable.put.

This method behaves like remove(String) when the given value is null, otherwise behaves like put(HttpField).

Parameters
name:String

the name of the field

value:String

the value of the field; if null the field is removed

Returns:HttpFields.Mutable

this instance

Annotations
@Override
putback to summary
public HttpFields.Mutable put(HttpHeader header, HttpHeaderValue value)

Overrides default org.eclipse.jetty.http.HttpFields.Mutable.put.

Doc from org.eclipse.jetty.http.HttpFields.Mutable.put.

This method behaves like remove(HttpHeader) when the given value is null, otherwise behaves like put(HttpField).

Parameters
header:HttpHeader

the name of the field

value:HttpHeaderValue

the value of the field; if null the field is removed

Returns:HttpFields.Mutable

this instance

Annotations
@Override
putback to summary
public HttpFields.Mutable put(HttpHeader header, String value)

Overrides default org.eclipse.jetty.http.HttpFields.Mutable.put.

Doc from org.eclipse.jetty.http.HttpFields.Mutable.put.

This method behaves like remove(HttpHeader) when the given value is null, otherwise behaves like put(HttpField).

Parameters
header:HttpHeader

the name of the field

value:String

the value of the field; if null the field is removed

Returns:HttpFields.Mutable

this instance

Annotations
@Override
putback to summary
public HttpFields.Mutable put(String name, List<String> list)

Overrides default org.eclipse.jetty.http.HttpFields.Mutable.put.

Doc from org.eclipse.jetty.http.HttpFields.Mutable.put.

Puts a field associated with a list of values.

Parameters
name:String

the name of the field

list:List<String>

the List value of the field. If null the field is cleared.

Returns:HttpFields.Mutable

this builder

Annotations
@Override