public final class ChunkedTransferEncoding extends Object implements TransferEncoding
TransferEncoding| Constructor and Description |
|---|
ChunkedTransferEncoding(int maxHeadersSize) |
| Modifier and Type | Method and Description |
|---|---|
ParsingResult |
parsePacket(org.glassfish.grizzly.filterchain.FilterChainContext ctx,
HttpHeader httpPacket,
org.glassfish.grizzly.Buffer buffer)
Parse HTTP packet payload, represented by
Buffer using specific transfer encoding. |
void |
prepareSerialize(org.glassfish.grizzly.filterchain.FilterChainContext ctx,
HttpHeader httpHeader,
HttpContent content)
This method will be called by
HttpCodecFilter to let TransferEncoding prepare itself for the content
serialization. |
org.glassfish.grizzly.Buffer |
serializePacket(org.glassfish.grizzly.filterchain.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. |
public boolean wantDecode(HttpHeader httpPacket)
HttpHeader, or
false otherwise.wantDecode in interface TransferEncodinghttpPacket - HttpHeader.HttpHeader, or
false otherwise.public boolean wantEncode(HttpHeader httpPacket)
HttpHeader, or
false otherwise.wantEncode in interface TransferEncodinghttpPacket - HttpHeader.HttpHeader, or
false otherwise.public void prepareSerialize(org.glassfish.grizzly.filterchain.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.prepareSerialize in interface TransferEncodingctx - FilterChainContexthttpHeader - HTTP packet headers.content - ready HTTP content (might be null).public ParsingResult parsePacket(org.glassfish.grizzly.filterchain.FilterChainContext ctx, HttpHeader httpPacket, org.glassfish.grizzly.Buffer buffer)
Buffer using specific transfer encoding.parsePacket in interface TransferEncodingctx - FilterChainContexthttpPacket - HttpHeader with parsed headers.buffer - Buffer HTTP message payload.ParsingResultpublic org.glassfish.grizzly.Buffer serializePacket(org.glassfish.grizzly.filterchain.FilterChainContext ctx,
HttpContent httpContent)
HttpContent using specific transfer encoding.serializePacket in interface TransferEncodingctx - FilterChainContexthttpContent - HttpContent with parsed HttpContent.getHttpHeader().BufferCopyright © 2017–2021 Oracle Corporation. All rights reserved.