java.lang.Object
org.glassfish.grizzly.http.HttpPacket
org.glassfish.grizzly.http.HttpContent
org.glassfish.grizzly.http.HttpTrailer
- All Implemented Interfaces:
org.glassfish.grizzly.Appendable<HttpContent>,org.glassfish.grizzly.Cacheable,MimeHeadersPacket
HttpContent message, which represents HTTP trailer message. Applicable only for chunked HTTP messages.- Author:
- Alexey Stashok
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classHttpTrailer message builder. -
Field Summary
Fields inherited from class org.glassfish.grizzly.http.HttpContent
content, httpHeader, isLast -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the HTTP mime header.voidaddHeader(String name, HeaderValue value) Add the HTTP mime header.voidAdd the HTTP mime header.voidaddHeader(Header header, HeaderValue value) Add the HTTP mime header.static HttpTrailer.Builderbuilder(HttpHeader httpHeader) ReturnsHttpTrailerbuilder.booleancontainsHeader(String name) Returns true, if the mime header with the specific name is present among the HttpHeader mime headers, or false otherwise.booleancontainsHeader(Header header) Returns true, if the mimeHeaderis present among the HttpHeader mime headers, otherwise returns false.static HttpTrailercreate()static HttpTrailercreate(HttpHeader httpHeader) Get the value, of the specific HTTP mime header.Get the value, of the specific HTTP mime header.Get allMimeHeaders, associated with the HttpHeader.final booleanisLast()Always true true for the trailer message.static booleanisTrailer(HttpContent httpContent) voidrecycle()protected voidreset()Reset the internal state.voidSet the value, of the specific HTTP mime header.voidsetHeader(String name, HeaderValue value) Set the value, of the specific HTTP mime header.voidSet the value, of the specific HTTP mime header.voidsetHeader(Header header, HeaderValue value) Set the value, of the specific HTTP mime header.protected voidsetTrailers(MimeHeaders trailers) Set the mime trailers.Methods inherited from class org.glassfish.grizzly.http.HttpContent
append, create, create, getContent, getHttpHeader, isBroken, isContent, isHeader, setContent, setLastMethods inherited from class org.glassfish.grizzly.http.HttpPacket
isHttp
-
Constructor Details
-
HttpTrailer
-
-
Method Details
-
isTrailer
- Returns:
- true if passed
HttpContentis a HttpTrailder.
-
create
-
create
-
builder
ReturnsHttpTrailerbuilder.- Returns:
HttpTrailer.Builder.
-
isLast
public final boolean isLast()Always true true for the trailer message.- Overrides:
isLastin classHttpContent- Returns:
- Always true true for the trailer message.
-
getHeaders
Get allMimeHeaders, associated with the HttpHeader.- Specified by:
getHeadersin interfaceMimeHeadersPacket- Returns:
- all
MimeHeaders, associated with the HttpHeader
-
getHeader
Get the value, of the specific HTTP mime header.- Specified by:
getHeaderin interfaceMimeHeadersPacket- Parameters:
name- the mime header name- Returns:
- the value, of the specific HTTP mime header
-
getHeader
Get the value, of the specific HTTP mime header.- Specified by:
getHeaderin interfaceMimeHeadersPacket- Parameters:
header- the mimeHeader- Returns:
- the value, of the specific HTTP mime header
-
setHeader
Set the value, of the specific HTTP mime header.- Specified by:
setHeaderin interfaceMimeHeadersPacket- Parameters:
name- the mime header namevalue- the mime header value
-
setHeader
Set the value, of the specific HTTP mime header.- Specified by:
setHeaderin interfaceMimeHeadersPacket- Parameters:
name- the mime header namevalue- the mime header value
-
setHeader
Set the value, of the specific HTTP mime header.- Specified by:
setHeaderin interfaceMimeHeadersPacket- Parameters:
header- the mimeHeadervalue- the mime header value
-
setHeader
Set the value, of the specific HTTP mime header.- Specified by:
setHeaderin interfaceMimeHeadersPacket- Parameters:
header- the mimeHeadervalue- the mime header value
-
addHeader
Add the HTTP mime header.- Specified by:
addHeaderin interfaceMimeHeadersPacket- Parameters:
name- the mime header namevalue- the mime header value
-
addHeader
Add the HTTP mime header.- Specified by:
addHeaderin interfaceMimeHeadersPacket- Parameters:
name- the mime header namevalue- the mime header value
-
addHeader
Add the HTTP mime header.- Specified by:
addHeaderin interfaceMimeHeadersPacket- Parameters:
header- the mimeHeadervalue- the mime header value
-
addHeader
Add the HTTP mime header.- Specified by:
addHeaderin interfaceMimeHeadersPacket- Parameters:
header- the mimeHeadervalue- the mime header value
-
containsHeader
Returns true, if the mime header with the specific name is present among the HttpHeader mime headers, or false otherwise.- Specified by:
containsHeaderin interfaceMimeHeadersPacket- Parameters:
name- the mime header name- Returns:
- true, if the mime header with the specific name is present among the HttpHeader mime headers, or false otherwise
-
containsHeader
Returns true, if the mimeHeaderis present among the HttpHeader mime headers, otherwise returns false.- Specified by:
containsHeaderin interfaceMimeHeadersPacket- Parameters:
header- the mimeHeader- Returns:
- true, if the mime
Headeris present among the HttpHeader mime headers, otherwise returns false
-
setTrailers
Set the mime trailers.- Parameters:
trailers-MimeHeaders.
-
reset
protected void reset()Reset the internal state.- Overrides:
resetin classHttpContent
-
recycle
public void recycle()- Specified by:
recyclein interfaceorg.glassfish.grizzly.Cacheable- Overrides:
recyclein classHttpContent
-