Package org.eclipse.jetty.http
Class MetaData
- java.lang.Object
-
- org.eclipse.jetty.http.MetaData
-
- All Implemented Interfaces:
java.lang.Iterable<HttpField>
- Direct Known Subclasses:
MetaData.Request
,MetaData.Response
public class MetaData extends java.lang.Object implements java.lang.Iterable<HttpField>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetaData.Request
static class
MetaData.Response
-
Constructor Summary
Constructors Constructor Description MetaData(HttpVersion version, HttpFields fields)
MetaData(HttpVersion version, HttpFields fields, long contentLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
getContentLength()
HttpFields
getFields()
HttpVersion
getHttpVersion()
java.util.function.Supplier<HttpFields>
getTrailerSupplier()
HttpVersion
getVersion()
Deprecated.usegetHttpVersion()
insteadboolean
isRequest()
boolean
isResponse()
java.util.Iterator<HttpField>
iterator()
protected void
recycle()
void
setContentLength(long contentLength)
void
setHttpVersion(HttpVersion httpVersion)
void
setTrailerSupplier(java.util.function.Supplier<HttpFields> trailers)
java.lang.String
toString()
-
-
-
Constructor Detail
-
MetaData
public MetaData(HttpVersion version, HttpFields fields)
-
MetaData
public MetaData(HttpVersion version, HttpFields fields, long contentLength)
-
-
Method Detail
-
recycle
protected void recycle()
-
isRequest
public boolean isRequest()
-
isResponse
public boolean isResponse()
-
getVersion
@Deprecated public HttpVersion getVersion()
Deprecated.usegetHttpVersion()
instead- Returns:
- the HTTP version of this MetaData object
-
getHttpVersion
public HttpVersion getHttpVersion()
- Returns:
- the HTTP version of this MetaData object
-
setHttpVersion
public void setHttpVersion(HttpVersion httpVersion)
- Parameters:
httpVersion
- the HTTP version to set
-
getFields
public HttpFields getFields()
- Returns:
- the HTTP fields of this MetaData object
-
getTrailerSupplier
public java.util.function.Supplier<HttpFields> getTrailerSupplier()
-
setTrailerSupplier
public void setTrailerSupplier(java.util.function.Supplier<HttpFields> trailers)
-
getContentLength
public long getContentLength()
- Returns:
- the content length if available, otherwise
Long.MIN_VALUE
-
setContentLength
public void setContentLength(long contentLength)
-
iterator
public java.util.Iterator<HttpField> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<HttpField>
- Returns:
- an iterator over the HTTP fields
- See Also:
getFields()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-