java.lang.Object
org.eclipse.jetty.http.MetaData
- Direct Known Subclasses:
MetaData.Request
,MetaData.Response
Immutable common HTTP information for requests and responses.
Specific HTTP request information is captured by MetaData.Request
.
Specific HTTP response information is captured by MetaData.Response
.
HTTP trailers information is captured by MetaData
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Immutable HTTP CONNECT request information.static class
Immutable HTTP request information.static class
Immutable HTTP response information. -
Constructor Summary
ConstructorsConstructorDescriptionMetaData
(HttpVersion version, HttpFields fields) MetaData
(HttpVersion version, HttpFields fields, long contentLength) MetaData
(HttpVersion version, HttpFields headers, long contentLength, Supplier<HttpFields> trailersSupplier) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MetaData
-
MetaData
-
MetaData
public MetaData(HttpVersion version, HttpFields headers, long contentLength, Supplier<HttpFields> trailersSupplier)
-
-
Method Details
-
isTunnel
Returns whether the given HTTP request method and HTTP response status code identify a successful HTTP CONNECT tunnel.
- Parameters:
method
- the HTTP request methodstatus
- the HTTP response status code- Returns:
- whether method and status identify a successful HTTP CONNECT tunnel
-
isRequest
public boolean isRequest()- Returns:
- whether this object is a
MetaData.Request
-
isResponse
public boolean isResponse()- Returns:
- whether this object is a
MetaData.Response
-
getHttpVersion
- Returns:
- the HTTP protocol version
-
getHttpFields
- Returns:
- the HTTP headers or HTTP trailers
-
getTrailersSupplier
- Returns:
- a supplier for the HTTP trailers
-
getContentLength
public long getContentLength()- Returns:
- the length of the content in bytes
-
iterator
-
toString
-