Top Description Constructors Methods
org.glassfish.grizzly.http

public final Class FixedLengthTransferEncoding

extends Object
implements TransferEncoding
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.http.TransferEncoding
Imports
org.glassfish.grizzly.Buffer, org.glassfish.grizzly.filterchain.FilterChainContext, org.glassfish.grizzly.http.HttpCodecFilter.ContentParsingState

Fixed length transfer encoding implementation.
Author
Alexey Stashok
See Also
TransferEncoding

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ParsingResult
parsePacket(FilterChainContext ctx, HttpHeader httpPacket, Buffer input)

Implements org.glassfish.grizzly.http.TransferEncoding.parsePacket.

Parse HTTP packet payload, represented by Buffer using specific transfer encoding.

public void
prepareSerialize(FilterChainContext ctx, HttpHeader httpHeader, HttpContent httpContent)

Implements org.glassfish.grizzly.http.TransferEncoding.prepareSerialize.

This method will be called by HttpCodecFilter to let TransferEncoding prepare itself for the content serialization.

public Buffer
serializePacket(FilterChainContext ctx, HttpContent httpContent)

Implements org.glassfish.grizzly.http.TransferEncoding.serializePacket.

Serialize HTTP packet payload, represented by HttpContent using specific transfer encoding.

public boolean
wantDecode(HttpHeader httpPacket)

Implements org.glassfish.grizzly.http.TransferEncoding.wantDecode.

Return true if this encoding should be used to parse the content of the passed HttpHeader, or false otherwise.

public boolean
wantEncode(HttpHeader httpPacket)

Implements org.glassfish.grizzly.http.TransferEncoding.wantEncode.

Return true if this encoding should be used to serialize the content of the passed HttpHeader, or false otherwise.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FixedLengthTransferEncodingback to summary
public FixedLengthTransferEncoding()

Method Detail

parsePacketback to summary
public ParsingResult parsePacket(FilterChainContext ctx, HttpHeader httpPacket, Buffer input)

Implements org.glassfish.grizzly.http.TransferEncoding.parsePacket.

Doc from org.glassfish.grizzly.http.TransferEncoding.parsePacket.

Parse HTTP packet payload, represented by Buffer using specific transfer encoding.

Annotations
@Override
@SuppressWarnings:UnusedDeclaration
prepareSerializeback to summary
public void prepareSerialize(FilterChainContext ctx, HttpHeader httpHeader, HttpContent httpContent)

Implements org.glassfish.grizzly.http.TransferEncoding.prepareSerialize.

Doc from org.glassfish.grizzly.http.TransferEncoding.prepareSerialize.

This method will be called by HttpCodecFilter to let TransferEncoding prepare itself for the content serialization. At this time TransferEncoding is able to change, update HTTP packet headers.

Annotations
@Override
serializePacketback to summary
public Buffer serializePacket(FilterChainContext ctx, HttpContent httpContent)

Implements org.glassfish.grizzly.http.TransferEncoding.serializePacket.

Doc from org.glassfish.grizzly.http.TransferEncoding.serializePacket.

Serialize HTTP packet payload, represented by HttpContent using specific transfer encoding.

Annotations
@Override
wantDecodeback to summary
public boolean wantDecode(HttpHeader httpPacket)

Implements org.glassfish.grizzly.http.TransferEncoding.wantDecode.

Doc from org.glassfish.grizzly.http.TransferEncoding.wantDecode.

Return true if this encoding should be used to parse the content of the passed HttpHeader, or false otherwise.

Annotations
@Override
wantEncodeback to summary
public boolean wantEncode(HttpHeader httpPacket)

Implements org.glassfish.grizzly.http.TransferEncoding.wantEncode.

Doc from org.glassfish.grizzly.http.TransferEncoding.wantEncode.

Return true if this encoding should be used to serialize the content of the passed HttpHeader, or false otherwise.

Annotations
@Override