java.lang.Object
org.eclipse.jetty.http.HttpFields.ImmutableHttpFields
- All Implemented Interfaces:
Iterable<HttpField>,Supplier<HttpFields>,HttpFields
- Enclosing interface:
HttpFields
HTTP Fields. A collection of HTTP header and or Trailer fields.
This class is not synchronized as it is expected that modifications will only be performed by a single thread.
The cookie handling provided by this class is guided by the Servlet specification and RFC6265.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.http.HttpFields
HttpFields.ImmutableHttpFields, HttpFields.Mutable, HttpFields.MutableHttpFields -
Field Summary
Fields inherited from interface org.eclipse.jetty.http.HttpFields
CONNECTION_CLOSE, CONNECTION_KEEPALIVE, CONTENT_LENGTH_0, EMPTY, EXPIRES_01JAN1970 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedImmutableHttpFields(HttpField[] fields) Initialize HttpFields from copy.protectedImmutableHttpFields(HttpField[] fields, int size) -
Method Summary
Modifier and TypeMethodDescriptionbooleanget(HttpHeader header) getField(int index) Get a Field by index.getField(HttpHeader header) inthashCode()iterator()intsize()stream()Efficiently take the fields as an Immutable that cannot be changed by any further mutations to this instance.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.http.HttpFields
asString, contains, contains, contains, contains, contains, contains, get, getCSV, getCSV, getDateField, getDateField, getFieldNames, getFieldNamesCollection, getFields, getFields, getLongField, getLongField, getQualityCSV, getQualityCSV, getQualityCSV, getValues, getValuesList, getValuesList, isEqualToMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ImmutableHttpFields
Initialize HttpFields from copy.- Parameters:
fields- the fields to copy data from
-
ImmutableHttpFields
-
-
Method Details
-
asImmutable
- Specified by:
asImmutablein interfaceHttpFields
-
takeAsImmutable
Description copied from interface:HttpFieldsEfficiently take the fields as an Immutable that cannot be changed by any further mutations to this instance.- Specified by:
takeAsImmutablein interfaceHttpFields- Returns:
- An immutable version of the fields.
-
equals
-
get
- Specified by:
getin interfaceHttpFields
-
get
- Specified by:
getin interfaceHttpFields
-
getField
- Specified by:
getFieldin interfaceHttpFields
-
getField
- Specified by:
getFieldin interfaceHttpFields
-
getField
Description copied from interface:HttpFieldsGet a Field by index.- Specified by:
getFieldin interfaceHttpFields- Parameters:
index- the field index- Returns:
- A Field value or null if the Field value has not been set
-
hashCode
public int hashCode() -
iterator
-
size
public int size()- Specified by:
sizein interfaceHttpFields
-
stream
- Specified by:
streamin interfaceHttpFields
-
toString
-