Class MetaData
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 classImmutable HTTP CONNECT request information.static interfaceMarker interface to signal that aMetaDatacould not be created, for example due to an invalid URI or invalid headers.static classImmutable HTTP request information.static classImmutable 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
Modifier and TypeMethodDescriptionlongGet the length of the content in bytes.Get the HTTP headers or HTTP trailers.Get the HTTP protocol version.booleanbooleanstatic booleanReturns whether the given HTTP request method and HTTP response status code identify a successful HTTP CONNECT tunnel.iterator()toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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
Get the HTTP protocol version.- Returns:
 - the HTTP protocol version
 
 - 
getHttpFields
Get the HTTP headers or HTTP trailers.- Returns:
 - the HTTP headers or HTTP trailers
 
 - 
getTrailersSupplier
- Returns:
 - a supplier for the HTTP trailers
 
 - 
getContentLength
public long getContentLength()Get the length of the content in bytes.- Returns:
 - the length of the content in bytes
 
 - 
iterator
 - 
toString
 
 -