HttpCodecFilter implementation, which is responsible for decoding HttpResponsePacket and
encoding HttpRequestPacket messages.
This Filter is usually used, when we build an asynchronous HTTP client connection.
HttpCodecFilter, HttpServerFilter
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Attribute | |
| private final Attribute |
| Access | Constructor and Description |
|---|---|
| public | |
| public | HttpClientFilter(int
the maximum size of the HTTP message header. maxHeadersSize)Constructor, which creates HttpClientFilter instance, with the specific max header size parameter. |
| public | HttpClientFilter(final int
the maximum size of the HTTP message header. maxHeadersSize, final Properties the properties to be used by this filter. props)Constructor, which creates HttpClientFilter instance, with the specific max header size and properties parameter. |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | |
| protected final void | |
| private HttpClientFilter. | |
| pack-priv final boolean | decodeInitialLineFromBuffer(final FilterChainContext ctx, final HttpPacketParsing httpPacket, final HttpCodecFilter.
Implements abstract org. Method is responsible for parsing initial line of HTTP message (different for |
| pack-priv final boolean | decodeInitialLineFromBytes(final FilterChainContext ctx, final HttpPacketParsing httpPacket, final HttpCodecFilter.
Implements abstract org. Method is responsible for parsing initial line of HTTP message (different for |
| protected Buffer | encodeHttpPacket(final FilterChainContext ctx, final HttpPacket input)
Overrides org.
|
| pack-priv Buffer | encodeInitialLine(HttpPacket httpPacket, Buffer output, MemoryManager<E extends Buffer> memoryManager)
Implements abstract org. Method is responsible for serializing initial line of HTTP message (different for |
| private Queue | |
| public NextAction | handleEvent(final FilterChainContext ctx, final FilterChainEvent event)
Overrides org. Implements org. Handle custom event associated with the |
| public NextAction | Returns: NextActionRequest processing context ctx)Overrides org. Implements org. The method is called, once we have received a |
| public NextAction | handleWrite(FilterChainContext ctx)
Overrides org. Implements org. The method is called, once we need to serialize a |
| protected void | onHttpContentEncoded(HttpContent content, FilterChainContext ctx)
Implements abstract org. Invoked when a HTTP body chunk has been encoded in preparation to being transmitted to the user-agent. |
| protected void | onHttpContentError(final HttpHeader httpHeader, final FilterChainContext ctx, final Throwable t)
Implements abstract org. Callback which is invoked when parsing an HTTP message payload fails. |
| protected void | onHttpContentParsed(HttpContent content, FilterChainContext ctx)
Implements abstract org.
Invoked as request/response body content has been processed by this |
| protected void | onHttpHeaderError(final HttpHeader httpHeader, final FilterChainContext ctx, final Throwable t)
Implements abstract org. Callback which is invoked when parsing an HTTP message header fails. |
| protected boolean | onHttpHeaderParsed(final HttpHeader httpHeader, final Buffer buffer, final FilterChainContext ctx)
Implements abstract org. Callback invoked when the HTTP message header parsing is complete. |
| protected void | onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx)
Implements abstract org. Invoked when HTTP headers have been encoded in preparation to being transmitted to the user-agent. |
| protected void | onHttpHeadersParsed(final HttpHeader httpHeader, final MimeHeaders headers, final FilterChainContext ctx)
Implements abstract org.
Invoked when HTTP headers portion comes for |
| protected boolean | onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx)
Implements abstract org. Callback method, called when |
| protected void | onInitialLineEncoded(HttpHeader header, FilterChainContext ctx)
Implements abstract org. Invoked when the initial response line has been encoded in preparation to being transmitted to the user-agent. |
| protected void | onInitialLineParsed(final HttpHeader httpHeader, final FilterChainContext ctx)
Implements abstract org. Invoked when either the request line or status line has been parsed. |
| private static void |
| httpRequestQueueAttr | back to summary |
|---|---|
| private final Attribute<Queue<HttpRequestPacket>> httpRequestQueueAttr | |
| httpResponseInProcessAttr | back to summary |
|---|---|
| private final Attribute<HttpResponsePacket> httpResponseInProcessAttr | |
| HttpClientFilter | back to summary |
|---|---|
| public HttpClientFilter() Constructor, which creates HttpClientFilter instance | |
| HttpClientFilter | back to summary |
|---|---|
| public HttpClientFilter(int maxHeadersSize) Constructor, which creates HttpClientFilter instance, with the specific max header size parameter.
| |
| HttpClientFilter | back to summary |
|---|---|
| public HttpClientFilter(final int maxHeadersSize, final Properties props) Constructor, which creates HttpClientFilter instance, with the specific max header size and properties parameter.
| |
| checkKeepAlive | back to summary |
|---|---|
| private static boolean checkKeepAlive(final HttpResponsePacket response) | |
| clearResponse | back to summary |
|---|---|
| protected final void clearResponse(final Connection<L> connection) | |
| createHttpResponse | back to summary |
|---|---|
| private HttpClientFilter. | |
| decodeInitialLineFromBuffer | back to summary |
|---|---|
| pack-priv final boolean decodeInitialLineFromBuffer(final FilterChainContext ctx, final HttpPacketParsing httpPacket, final HttpCodecFilter. Implements abstract org. Doc from org. Method is responsible for parsing initial line of HTTP message (different for
| |
| decodeInitialLineFromBytes | back to summary |
|---|---|
| pack-priv final boolean decodeInitialLineFromBytes(final FilterChainContext ctx, final HttpPacketParsing httpPacket, final HttpCodecFilter. Implements abstract org. Doc from org. Method is responsible for parsing initial line of HTTP message (different for
| |
| encodeHttpPacket | back to summary |
|---|---|
| protected Buffer encodeHttpPacket(final FilterChainContext ctx, final HttpPacket input) Overrides org.
| |
| encodeInitialLine | back to summary |
|---|---|
| pack-priv Buffer encodeInitialLine(HttpPacket httpPacket, Buffer output, MemoryManager<E extends Buffer> memoryManager) Implements abstract org. Doc from org. Method is responsible for serializing initial line of HTTP message (different for
| |
| getRequestQueue | back to summary |
|---|---|
| private Queue | |
| handleEvent | back to summary |
|---|---|
| public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException Overrides org. Implements org. Doc from org. Handle custom event associated with the
| |
| handleRead | back to summary |
|---|---|
| public NextAction handleRead(FilterChainContext ctx) throws IOException Overrides org. Implements org. The method is called, once we have received a
| |
| handleWrite | back to summary |
|---|---|
| public NextAction handleWrite(FilterChainContext ctx) throws IOException Overrides org. Implements org. Doc from org. The method is called, once we need to serialize a
| |
| onHttpContentEncoded | back to summary |
|---|---|
| protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) Implements abstract org. Doc from org. Invoked when a HTTP body chunk has been encoded in preparation to being transmitted to the user-agent.
| |
| onHttpContentError | back to summary |
|---|---|
| protected void onHttpContentError(final HttpHeader httpHeader, final FilterChainContext ctx, final Throwable t) throws IOException Implements abstract org. Doc from org. Callback which is invoked when parsing an HTTP message payload fails. The processing logic has to take care about error handling and following connection closing.
| |
| onHttpContentParsed | back to summary |
|---|---|
| protected void onHttpContentParsed(HttpContent content, FilterChainContext ctx) Implements abstract org. Doc from org.
Invoked as request/response body content has been processed by this
| |
| onHttpHeaderError | back to summary |
|---|---|
| protected void onHttpHeaderError(final HttpHeader httpHeader, final FilterChainContext ctx, final Throwable t) throws IOException Implements abstract org. Doc from org. Callback which is invoked when parsing an HTTP message header fails. The processing logic has to take care about error handling and following connection closing.
| |
| onHttpHeaderParsed | back to summary |
|---|---|
| protected boolean onHttpHeaderParsed(final HttpHeader httpHeader, final Buffer buffer, final FilterChainContext ctx) Implements abstract org. Doc from org. Callback invoked when the HTTP message header parsing is complete.
| |
| onHttpHeadersEncoded | back to summary |
|---|---|
| protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) Implements abstract org. Doc from org. Invoked when HTTP headers have been encoded in preparation to being transmitted to the user-agent.
| |
| onHttpHeadersParsed | back to summary |
|---|---|
| protected void onHttpHeadersParsed(final HttpHeader httpHeader, final MimeHeaders headers, final FilterChainContext ctx) Implements abstract org. Doc from org.
Invoked when HTTP headers portion comes for
| |
| onHttpPacketParsed | back to summary |
|---|---|
| protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) Implements abstract org. Doc from org. Callback method, called when
| |
| onInitialLineEncoded | back to summary |
|---|---|
| protected void onInitialLineEncoded(HttpHeader header, FilterChainContext ctx) Implements abstract org. Doc from org. Invoked when the initial response line has been encoded in preparation to being transmitted to the user-agent.
| |
| onInitialLineParsed | back to summary |
|---|---|
| protected void onInitialLineParsed(final HttpHeader httpHeader, final FilterChainContext ctx) Implements abstract org. Doc from org. Invoked when either the request line or status line has been parsed.
| |
| prepareRequest | back to summary |
|---|---|
| private static void prepareRequest(final HttpRequestPacket request) | |
| Modifier and Type | Field and Description |
|---|---|
| private static final ThreadCache. | |
| private final HttpCodecFilter. | |
| private boolean | contentTypeParsed
content type parsed flag. |
| private final HttpCodecFilter. | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static HttpClientFilter. | |
| public String | |
| public HttpCodecFilter. | |
| public String | |
| public HttpCodecFilter. | |
| protected HttpPacketParsing | |
| public ProcessingState | |
| public void | initialize(final HttpCodecFilter filter, final int initialOffset, final int maxHeaderSize, final int maxNumberOfHeaders)
|
| public boolean | |
| private void | |
| public void | recycle()
Overrides org. Implements org.
|
| protected void | |
| public void | setCharacterEncoding(final String charset)
Overrides org. Set the character encoding of this HTTP message. |
| public void | setHeaderParsed(boolean isHeaderParsed)
Implements org.
|
| CACHE_IDX | back to summary |
|---|---|
| private static final ThreadCache. | |
| contentParsingState | back to summary |
|---|---|
| private final HttpCodecFilter. | |
| contentTypeParsed | back to summary |
|---|---|
| private boolean contentTypeParsed content type parsed flag. | |
| headerParsingState | back to summary |
|---|---|
| private final HttpCodecFilter. | |
| isHeaderParsed | back to summary |
|---|---|
| private boolean isHeaderParsed | |
| ClientHttpResponseImpl | back to summary |
|---|---|
| private ClientHttpResponseImpl() | |
| create | back to summary |
|---|---|
| public static HttpClientFilter. | |
| getCharacterEncoding | back to summary |
|---|---|
| public String getCharacterEncoding() Overrides org.
| |
| getContentParsingState | back to summary |
|---|---|
| public HttpCodecFilter. Implements org.
| |
| getContentType | back to summary |
|---|---|
| public String getContentType() Overrides org.
| |
| getHeaderParsingState | back to summary |
|---|---|
| public HttpCodecFilter. Implements org.
| |
| getParsingState | back to summary |
|---|---|
| protected HttpPacketParsing getParsingState() Overrides org.
| |
| getProcessingState | back to summary |
|---|---|
| public ProcessingState getProcessingState() Implements abstract org.
| |
| initialize | back to summary |
|---|---|
| public void initialize(final HttpCodecFilter filter, final int initialOffset, final int maxHeaderSize, final int maxNumberOfHeaders) | |
| isHeaderParsed | back to summary |
|---|---|
| public boolean isHeaderParsed() Implements org.
| |
| parseContentTypeHeader | back to summary |
|---|---|
| private void parseContentTypeHeader() | |
| recycle | back to summary |
|---|---|
| public void recycle() Overrides org. Implements org.
| |
| reset | back to summary |
|---|---|
| protected void reset() Overrides org. Doc from org. Reset the internal state.
| |
| setCharacterEncoding | back to summary |
|---|---|
| public void setCharacterEncoding(final String charset) Overrides org. Doc from org. Set the character encoding of this HTTP message.
| |
| setHeaderParsed | back to summary |
|---|---|
| public void setHeaderParsed(boolean isHeaderParsed) Implements org.
| |