Class HttpRequestDecoder.Result.Factory

Enclosing class:
HttpRequestDecoder.Result

  • Constructor Details

    • Factory

      protected Factory(HttpRequestDecoder decoder)
      Creates a new factory for the given decoder.
      Parameters:
      decoder - the decoder
  • Method Details

    • newResult

      public HttpRequestDecoder.Result newResult(boolean overflow, boolean underflow, boolean headerCompleted, HttpResponse response, boolean responseOnly)
      Create a new result.
      Parameters:
      overflow - true if the data didn’t fit in the out buffer
      underflow - true if more data is expected
      headerCompleted - true if the header has completely been decoded
      response - a response to send due to an error
      responseOnly - if the result includes a response this flag indicates that no further processing besides sending the response is required
      Returns:
      the result
    • newResult

      protected HttpRequestDecoder.Result newResult(boolean overflow, boolean underflow)
      Overrides the base interface’s factory method in order to make it return the extended return type.

      As the HttpRequestDecoder does not know about a response, this implementation always returns a result without one. This may be a preliminary result and replaced in HttpRequestDecoder.decode(ByteBuffer, Buffer, boolean).

      Specified by:
      newResult in class HttpDecoder.Result.Factory<HttpResponse>
      Parameters:
      overflow - true if the data didn’t fit in the out buffer
      underflow - true if more data is expected
      Returns:
      the result