public interface TransferEncoding
FixedLengthTransferEncoding,
ChunkedTransferEncoding| Modifier and Type | Method and Description |
|---|---|
ParsingResult |
parsePacket(FilterChainContext ctx,
HttpHeader httpPacket,
Buffer buffer)
Parse HTTP packet payload, represented by
Buffer using specific
transfer encoding. |
void |
prepareSerialize(FilterChainContext ctx,
HttpHeader httpHeader,
HttpContent content)
This method will be called by
HttpCodecFilter to let
TransferEncoding prepare itself for the content serialization. |
Buffer |
serializePacket(FilterChainContext ctx,
HttpContent httpContent)
Serialize HTTP packet payload, represented by
HttpContent
using specific transfer encoding. |
boolean |
wantDecode(HttpHeader httpPacket)
Return true if this encoding should be used to parse the
content of the passed
HttpHeader, or false otherwise. |
boolean |
wantEncode(HttpHeader httpPacket)
Return true if this encoding should be used to serialize the
content of the passed
HttpHeader, or false otherwise. |
boolean wantDecode(HttpHeader httpPacket)
HttpHeader, or false otherwise.httpPacket - HttpHeader.HttpHeader, or false otherwise.boolean wantEncode(HttpHeader httpPacket)
HttpHeader, or false otherwise.httpPacket - HttpHeader.HttpHeader, or false otherwise.void prepareSerialize(FilterChainContext ctx, HttpHeader httpHeader, HttpContent content)
HttpCodecFilter to let
TransferEncoding prepare itself for the content serialization.
At this time TransferEncoding is able to change, update HTTP
packet headers.ctx - FilterChainContexthttpHeader - HTTP packet headers.content - ready HTTP content (might be null).ParsingResult parsePacket(FilterChainContext ctx, HttpHeader httpPacket, Buffer buffer)
Buffer using specific
transfer encoding.ctx - FilterChainContexthttpPacket - HttpHeader with parsed headers.buffer - Buffer HTTP message payload.ParsingResultBuffer serializePacket(FilterChainContext ctx, HttpContent httpContent)
HttpContent
using specific transfer encoding.ctx - FilterChainContexthttpContent - HttpContent with parsed HttpContent.getHttpHeader().BufferCopyright © 2016 Oracle Corporation. All Rights Reserved.