Top Description Inners Fields Constructors Methods
org.glassfish.grizzly.http

public Class HttpTrailer

extends HttpContent
implements MimeHeadersPacket
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.http.MimeHeadersPacket
Imports
org.glassfish.grizzly.ThreadCache, org.glassfish.grizzly.http.util.DataChunk, .Header, .HeaderValue, .MimeHeaders

HttpContent message, which represents HTTP trailer message. Applicable only for chunked HTTP messages.
Author
Alexey Stashok

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
HttpTrailer.Builder

HttpTrailer message builder.

Field Summary

Modifier and TypeField and Description
private static final ThreadCache.CachedTypeIndex<HttpTrailer>
private MimeHeaders
Inherited from org.glassfish.grizzly.http.HttpContent:
contenthttpHeaderisLast

Constructor Summary

AccessConstructor and Description
protected
HttpTrailer(HttpHeader httpHeader)

Method Summary

Modifier and TypeMethod and Description
public void
addHeader(final String name, final String value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Add the HTTP mime header.

public void
addHeader(final String name, final HeaderValue value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Add the HTTP mime header.

public void
addHeader(final Header header, final String value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Add the HTTP mime header.

public void
addHeader(final Header header, final HeaderValue value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Add the HTTP mime header.

public static HttpTrailer.Builder
public boolean
containsHeader(final String name)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.containsHeader.

Returns true, if the mime header with the specific name is present among the HttpHeader mime headers, or false otherwise.

public boolean
containsHeader(final Header header)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.containsHeader.

Returns true, if the mime Header is present among the HttpHeader mime headers, otherwise returns false.

public static HttpTrailer
public static HttpTrailer
public String
getHeader(final String name)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.getHeader.

Get the value, of the specific HTTP mime header.

public String
getHeader(final Header header)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.getHeader.

Get the value, of the specific HTTP mime header.

public MimeHeaders
getHeaders()

Implements org.glassfish.grizzly.http.MimeHeadersPacket.getHeaders.

Get all MimeHeaders, associated with the HttpHeader.

public final boolean

Returns:

Always true true for the trailer message.
isLast
()

Overrides org.glassfish.grizzly.http.HttpContent.isLast.

Always true true for the trailer message.

public static boolean
isTrailer(HttpContent httpContent)

Returns: true if passed HttpContent is a HttpTrailder.

public void
protected void
reset()

Overrides org.glassfish.grizzly.http.HttpContent.reset.

Reset the internal state.

public void
setHeader(final String name, final String value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Set the value, of the specific HTTP mime header.

public void
setHeader(final String name, final HeaderValue value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Set the value, of the specific HTTP mime header.

public void
setHeader(final Header header, final String value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Set the value, of the specific HTTP mime header.

public void
setHeader(final Header header, final HeaderValue value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Set the value, of the specific HTTP mime header.

protected void
setTrailers(final MimeHeaders trailers)

Set the mime trailers.

Inherited from org.glassfish.grizzly.http.HttpContent:
appendcreatecreategetContentgetHttpHeaderisBrokenisContentisHeadersetContentsetLast

Field Detail

CACHE_IDXback to summary
private static final ThreadCache.CachedTypeIndex<HttpTrailer> CACHE_IDX

Hides org.glassfish.grizzly.http.HttpContent.CACHE_IDX.

trailersback to summary
private MimeHeaders trailers

Constructor Detail

HttpTrailerback to summary
protected HttpTrailer(HttpHeader httpHeader)

Method Detail

addHeaderback to summary
public void addHeader(final String name, final String value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Add the HTTP mime header.

Annotations
@Override
addHeaderback to summary
public void addHeader(final String name, final HeaderValue value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Add the HTTP mime header.

Annotations
@Override
addHeaderback to summary
public void addHeader(final Header header, final String value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Add the HTTP mime header.

Annotations
@Override
addHeaderback to summary
public void addHeader(final Header header, final HeaderValue value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.addHeader.

Add the HTTP mime header.

Annotations
@Override
builderback to summary
public static HttpTrailer.Builder builder(HttpHeader httpHeader)

Hides org.glassfish.grizzly.http.HttpContent.builder.

Returns HttpTrailer builder.

Returns:HttpTrailer.Builder

Builder.

containsHeaderback to summary
public boolean containsHeader(final String name)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.containsHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.containsHeader.

Returns true, if the mime header with the specific name is present among the HttpHeader mime headers, or false otherwise.

Annotations
@Override
containsHeaderback to summary
public boolean containsHeader(final Header header)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.containsHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.containsHeader.

Returns true, if the mime Header is present among the HttpHeader mime headers, otherwise returns false.

Annotations
@Override
createback to summary
public static HttpTrailer create()

Hides org.glassfish.grizzly.http.HttpContent.create.

createback to summary
public static HttpTrailer create(HttpHeader httpHeader)

Hides org.glassfish.grizzly.http.HttpContent.create.

getHeaderback to summary
public String getHeader(final String name)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.getHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.getHeader.

Get the value, of the specific HTTP mime header.

Annotations
@Override
getHeaderback to summary
public String getHeader(final Header header)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.getHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.getHeader.

Get the value, of the specific HTTP mime header.

Annotations
@Override
getHeadersback to summary
public MimeHeaders getHeaders()

Implements org.glassfish.grizzly.http.MimeHeadersPacket.getHeaders.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.getHeaders.

Get all MimeHeaders, associated with the HttpHeader.

Annotations
@Override
isLastback to summary
public final boolean isLast()

Overrides org.glassfish.grizzly.http.HttpContent.isLast.

Always true true for the trailer message.

Returns:boolean

Always true true for the trailer message.

Annotations
@Override
isTrailerback to summary
public static boolean isTrailer(HttpContent httpContent)
Returns:boolean

true if passed HttpContent is a HttpTrailder.

recycleback to summary
public void recycle()

Overrides org.glassfish.grizzly.http.HttpContent.recycle.

Implements org.glassfish.grizzly.Cacheable.recycle.

Annotations
@Override
resetback to summary
protected void reset()

Overrides org.glassfish.grizzly.http.HttpContent.reset.

Doc from org.glassfish.grizzly.http.HttpContent.reset.

Reset the internal state.

Annotations
@Override
setHeaderback to summary
public void setHeader(final String name, final String value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Set the value, of the specific HTTP mime header.

Annotations
@Override
setHeaderback to summary
public void setHeader(final String name, final HeaderValue value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Set the value, of the specific HTTP mime header.

Annotations
@Override
setHeaderback to summary
public void setHeader(final Header header, final String value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Set the value, of the specific HTTP mime header.

Annotations
@Override
setHeaderback to summary
public void setHeader(final Header header, final HeaderValue value)

Implements org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Doc from org.glassfish.grizzly.http.MimeHeadersPacket.setHeader.

Set the value, of the specific HTTP mime header.

Annotations
@Override
setTrailersback to summary
protected void setTrailers(final MimeHeaders trailers)

Set the mime trailers.

Parameters
trailers:MimeHeaders

MimeHeaders.

Annotations
@SuppressWarnings:unused
org.glassfish.grizzly.http back to summary

public final Class HttpTrailer.Builder

extends HttpContent.Builder<HttpTrailer.Builder>
Class Inheritance

HttpTrailer message builder.

Field Summary

Modifier and TypeField and Description
private MimeHeaders
Inherited from org.glassfish.grizzly.http.HttpContent.Builder:
contenthttpHeaderlast

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public HttpTrailer

Returns:

HttpTrailer
build
()

Overrides org.glassfish.grizzly.http.HttpContent.Builder.build.

Build the HttpTrailer message.

protected HttpContent
public HttpTrailer.Builder
header(String
the mime header name.
name
,
String
the mime header value.
value
)

Add the HTTP mime header.

public HttpTrailer.Builder
headers(MimeHeaders mimeTrailers)

Set the mime trailers.

Inherited from org.glassfish.grizzly.http.HttpContent.Builder:
contenthttpHeaderlastreset

Field Detail

mimeTrailersback to summary
private MimeHeaders mimeTrailers

Constructor Detail

Builderback to summary
protected Builder()

Method Detail

buildback to summary
public HttpTrailer build()

Overrides org.glassfish.grizzly.http.HttpContent.Builder.build.

Build the HttpTrailer message.

Returns:HttpTrailer

HttpTrailer

Annotations
@Override
createback to summary
protected HttpContent create()

Overrides org.glassfish.grizzly.http.HttpContent.Builder.create.

Annotations
@Override
headerback to summary
public HttpTrailer.Builder header(String name, String value)

Add the HTTP mime header.

Parameters
name:String

the mime header name.

value:String

the mime header value.

headersback to summary
public HttpTrailer.Builder headers(MimeHeaders mimeTrailers)

Set the mime trailers. This method will overwrite any trailers provided via header(String, String) before this invocation.

Parameters
mimeTrailers:MimeHeaders

MimeHeaders.