HttpCodecFilter implementation, which is responsible for decoding HttpRequestPacket and
encoding HttpResponsePacket messages.
This Filter is usually used, when we build an asynchronous HTTP server connection.
HttpCodecFilter, HttpClientFilter
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private boolean | |
| private String | |
| private byte[] | |
| private byte[] | |
| public static final String | |
| private final Attribute | |
| private final KeepAlive | |
| private final Attribute | |
| private final DelayedExecutor. | |
| private final int | |
| private final int | |
| public static final FilterChainEvent |
| Access | Constructor and Description |
|---|---|
| public | HttpServerFilter()
Deprecated
Next major release will include builders for filters requiring configuration. Constructors will be
hidden.
Constructor, which creates HttpServerFilter instance |
| public | HttpServerFilter(boolean
flag indicating whether or not chunking should be allowed or not. chunkingEnabled, int the maximum size of an inbound HTTP message header. maxHeadersSize, KeepAlive keep-alive configuration for this filter instance. keepAlive, DelayedExecutor DelayedExecutor for handling keep-alive.
Deprecated
Next major release will include builders for filters requiring configuration. Constructors will be
hidden.
Constructor, which creates HttpServerFilter instance, with the specific max header size parameter. |
| public | HttpServerFilter(boolean
flag indicating whether or not chunking should be allowed or not. chunkingEnabled, int the maximum size of an inbound HTTP message header. maxHeadersSize, String the content type that the response should use if no content had been specified at
the time the response is committed. defaultResponseContentType, KeepAlive keep-alive configuration for this filter instance. keepAlive, DelayedExecutor DelayedExecutor for handling keep-alive. If null - keep-alive idle connections
should be managed outside HttpServerFilter.
Deprecated
Next major release will include builders for filters requiring configuration. Constructors will be
hidden.
Constructor, which creates HttpServerFilter instance, with the specific max header size parameter. |
| public | HttpServerFilter(boolean
flag indicating whether or not chunking should be allowed or not. chunkingEnabled, int the maximum size of an inbound HTTP message header. maxHeadersSize, String the content type that the response should use if no content had been specified at
the time the response is committed. defaultResponseContentType, KeepAlive keep-alive configuration for this filter instance. keepAlive, DelayedExecutor DelayedExecutor for handling keep-alive. If null - keep-alive idle connections
should be managed outside HttpServerFilter.maximum number of request headers allowed for a single request. maxRequestHeaders, int maximum number of response headers allowed for a single response. maxResponseHeaders)
Deprecated
Next major release will include builders for filters requiring configuration. Constructors will be
hidden.
Constructor, which creates HttpServerFilter instance, with the specific max header size parameter. |
| public | HttpServerFilter(boolean
flag indicating whether or not chunking should be allowed or not. chunkingEnabled, int the maximum size of an inbound HTTP message header. maxHeadersSize, String the content type that the response should use if no content had been specified at
the time the response is committed. defaultResponseContentType, KeepAlive keep-alive configuration for this filter instance. keepAlive, DelayedExecutor DelayedExecutor for handling keep-alive. If null - keep-alive idle connections
should be managed outside HttpServerFilter.maximum number of request headers allowed for a single request. maxRequestHeaders, int maximum number of response headers allowed for a single response. maxResponseHeaders, final Properties the properties to be used by the filter. props)
Deprecated
Next major release will include builders for filters requiring configuration. Constructors will be
hidden.
Constructor, which creates HttpServerFilter instance, with the specific max header size and properties parameter. |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | checkContentLengthRemainder(final HttpRequestPacket httpRequest)
Returns: false if the request payload size is specified by the content-length header and according to the
request parsing state the remaining payload size is larger than |
| private boolean | |
| private void | |
| protected HttpContent | |
| 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 |
| pack-priv Buffer | encodeInitialLine(HttpPacket httpPacket, HttpStatus status, Buffer output, MemoryManager<E extends Buffer> memoryManager)
Overrides org. Variant of |
| private Buffer | encodeInitialLine(HttpResponsePacket httpResponse, HttpStatus status, Buffer output, MemoryManager<E extends Buffer> memoryManager)
|
| public String | |
| public NextAction | handleClose(final FilterChainContext ctx)
Overrides org. Implements org. Execute a unit of processing work to be performed, when connection has been closed. |
| 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 boolean | Returns: true if "undefined" methods support payload, or false otherwiseThe flag, which enables/disables payload support for HTTP methods, for which HTTP spec doesn't clearly state whether they support payload. |
| 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 final boolean | onHttpPacketParsed(final HttpHeader httpHeader, final 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 boolean | parseRequestURI(final HttpServerFilter.
|
| private static boolean | parseRequestURI(HttpServerFilter.
|
| private void | prepareRequest(final HttpServerFilter.
|
| private HttpContent | Returns: encoded HttpContent, if content encoders have been applied, or null, if HttpContent wasn't changed.Prepare Http response |
| private void | processResponseComplete(final FilterChainContext ctx, final HttpRequestPacket httpRequest, final boolean isStayAlive)
|
| private void | sendAcknowledgment(final HttpRequestPacket request, final HttpResponsePacket response, final FilterChainContext ctx)
|
| private void | |
| public void | setAllowPayloadForUndefinedHttpMethods(boolean
true if "undefined" methods support payload, or false
otherwise allowPayloadForUndefinedHttpMethods)The flag, which enables/disables payload support for HTTP methods, for which HTTP spec doesn't clearly state whether they support payload. |
| public final void |