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
Modifier and TypeClassDescriptionstatic final class
HttpTrailer message builder. -
Field Summary
Fields inherited from class org.glassfish.grizzly.http.HttpContent
content, httpHeader, isLast
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the HTTP mime header.void
addHeader
(String name, HeaderValue value) Add the HTTP mime header.void
Add the HTTP mime header.void
addHeader
(Header header, HeaderValue value) Add the HTTP mime header.static HttpTrailer.Builder
builder
(HttpHeader httpHeader) ReturnsHttpTrailer
builder.boolean
containsHeader
(String name) Returns true, if the mime header with the specific name is present among the HttpHeader mime headers, or false otherwise.boolean
containsHeader
(Header header) Returns true, if the mimeHeader
is present among the HttpHeader mime headers, otherwise returns false.static HttpTrailer
create()
static HttpTrailer
create
(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 boolean
isLast()
Always true true for the trailer message.static boolean
isTrailer
(HttpContent httpContent) void
recycle()
protected void
reset()
Reset the internal state.void
Set the value, of the specific HTTP mime header.void
setHeader
(String name, HeaderValue value) Set the value, of the specific HTTP mime header.void
Set the value, of the specific HTTP mime header.void
setHeader
(Header header, HeaderValue value) Set the value, of the specific HTTP mime header.protected void
setTrailers
(MimeHeaders trailers) Set the mime trailers.Methods inherited from class org.glassfish.grizzly.http.HttpContent
append, create, create, getContent, getHttpHeader, isBroken, isContent, isHeader, setContent, setLast
Methods inherited from class org.glassfish.grizzly.http.HttpPacket
isHttp
-
Constructor Details
-
HttpTrailer
-
-
Method Details
-
isTrailer
- Returns:
- true if passed
HttpContent
is a HttpTrailder.
-
create
-
create
-
builder
ReturnsHttpTrailer
builder.- Returns:
HttpTrailer.Builder
.
-
isLast
public final boolean isLast()Always true true for the trailer message.- Overrides:
isLast
in classHttpContent
- Returns:
- Always true true for the trailer message.
-
getHeaders
Get allMimeHeaders
, associated with the HttpHeader.- Specified by:
getHeaders
in interfaceMimeHeadersPacket
- Returns:
- all
MimeHeaders
, associated with the HttpHeader
-
getHeader
Get the value, of the specific HTTP mime header.- Specified by:
getHeader
in 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:
getHeader
in 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:
setHeader
in interfaceMimeHeadersPacket
- Parameters:
name
- the mime header namevalue
- the mime header value
-
setHeader
Set the value, of the specific HTTP mime header.- Specified by:
setHeader
in interfaceMimeHeadersPacket
- Parameters:
name
- the mime header namevalue
- the mime header value
-
setHeader
Set the value, of the specific HTTP mime header.- Specified by:
setHeader
in interfaceMimeHeadersPacket
- Parameters:
header
- the mimeHeader
value
- the mime header value
-
setHeader
Set the value, of the specific HTTP mime header.- Specified by:
setHeader
in interfaceMimeHeadersPacket
- Parameters:
header
- the mimeHeader
value
- the mime header value
-
addHeader
Add the HTTP mime header.- Specified by:
addHeader
in interfaceMimeHeadersPacket
- Parameters:
name
- the mime header namevalue
- the mime header value
-
addHeader
Add the HTTP mime header.- Specified by:
addHeader
in interfaceMimeHeadersPacket
- Parameters:
name
- the mime header namevalue
- the mime header value
-
addHeader
Add the HTTP mime header.- Specified by:
addHeader
in interfaceMimeHeadersPacket
- Parameters:
header
- the mimeHeader
value
- the mime header value
-
addHeader
Add the HTTP mime header.- Specified by:
addHeader
in interfaceMimeHeadersPacket
- Parameters:
header
- the mimeHeader
value
- 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:
containsHeader
in 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 mimeHeader
is present among the HttpHeader mime headers, otherwise returns false.- Specified by:
containsHeader
in interfaceMimeHeadersPacket
- Parameters:
header
- the mimeHeader
- Returns:
- true, if the mime
Header
is 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:
reset
in classHttpContent
-
recycle
public void recycle()- Specified by:
recycle
in interfaceorg.glassfish.grizzly.Cacheable
- Overrides:
recycle
in classHttpContent
-