- java.lang.Object
-
- org.eclipse.jetty.http.HttpFields.Immutable
-
- All Implemented Interfaces:
java.lang.Iterable<HttpField>,HttpFields
- Enclosing interface:
- HttpFields
public static class HttpFields.Immutable extends java.lang.Object implements 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.Immutable, HttpFields.Mutable
-
-
Field Summary
-
Fields inherited from interface org.eclipse.jetty.http.HttpFields
EMPTY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpFields.ImmutableasImmutable()booleanequals(java.lang.Object o)java.lang.Stringget(java.lang.String header)java.lang.Stringget(HttpHeader header)HttpFieldgetField(int index)Get a Field by index.HttpFieldgetField(java.lang.String name)HttpFieldgetField(HttpHeader header)inthashCode()java.util.Iterator<HttpField>iterator()intsize()java.util.stream.Stream<HttpField>stream()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.http.HttpFields
asString, contains, contains, contains, contains, contains, contains, getCSV, getCSV, getDateField, getFieldNames, getFieldNamesCollection, getFields, getFields, getLongField, getLongField, getQualityCSV, getQualityCSV, getQualityCSV, getValues, getValuesList, getValuesList, isEqualTo
-
-
-
-
Constructor Detail
-
Immutable
public Immutable(HttpField[] fields)
Initialize HttpFields from copy.- Parameters:
fields- the fields to copy data from
-
-
Method Detail
-
asImmutable
public HttpFields.Immutable asImmutable()
- Specified by:
asImmutablein interfaceHttpFields
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
get
public java.lang.String get(java.lang.String header)
- Specified by:
getin interfaceHttpFields
-
get
public java.lang.String get(HttpHeader header)
- Specified by:
getin interfaceHttpFields
-
getField
public HttpField getField(HttpHeader header)
- Specified by:
getFieldin interfaceHttpFields
-
getField
public HttpField getField(java.lang.String name)
- Specified by:
getFieldin interfaceHttpFields
-
getField
public HttpField getField(int index)
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()
- Overrides:
hashCodein classjava.lang.Object
-
iterator
public java.util.Iterator<HttpField> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<HttpField>
-
size
public int size()
- Specified by:
sizein interfaceHttpFields
-
stream
public java.util.stream.Stream<HttpField> stream()
- Specified by:
streamin interfaceHttpFields
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-