|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TransferEncoding
Abstraction, which represents HTTP transfer-encoding. The implementation should take care about possible HTTP content fragmentation.
FixedLengthTransferEncoding,
ChunkedTransferEncoding| Method Summary | |
|---|---|
ParsingResult |
parsePacket(Connection connection,
HttpHeader httpPacket,
Buffer buffer)
Parse HTTP packet payload, represented by Buffer using specific
transfer encoding. |
void |
prepareSerialize(HttpHeader httpHeader,
HttpContent content)
This method will be called by HttpCodecFilter to let
TransferEncoding prepare itself for the content serialization. |
Buffer |
serializePacket(Connection connection,
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. |
| Method Detail |
|---|
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(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.
httpHeader - HTTP packet headers.content - ready HTTP content (might be null).
ParsingResult parsePacket(Connection connection,
HttpHeader httpPacket,
Buffer buffer)
Buffer using specific
transfer encoding.
connection - ConnectionhttpPacket - HttpHeader with parsed headers.buffer - Buffer HTTP message payload.
ParsingResult
Buffer serializePacket(Connection connection,
HttpContent httpContent)
HttpContent
using specific transfer encoding.
connection - ConnectionhttpContent - HttpContent with parsed HttpContent.getHttpHeader().
Buffer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||