Class HttpResponseEncoder.Result.Factory

java.lang.Object
org.jdrupes.httpcodec.Codec.Result.Factory
org.jdrupes.httpcodec.protocols.http.HttpEncoder.Result.Factory
org.jdrupes.httpcodec.protocols.http.server.HttpResponseEncoder.Result.Factory
Enclosing class:
HttpResponseEncoder.Result

A factory for creating new Results.
  • Constructor Details

  • Method Details

    • newResult

      public HttpResponseEncoder.Result newResult(boolean overflow, boolean underflow, boolean closeConnection, String newProtocol, Decoder<?,?> newDecoder, Encoder<?,?> newEncoder)
      Create a new result.
      Parameters:
      overflow - true if the data didn’t fit in the out buffer
      underflow - true if more data is expected
      closeConnection - true if the connection should be closed
      newProtocol - the name of the new protocol if a switch occurred
      newDecoder - the new decoder if a switch occurred
      newEncoder - the new decoder if a switch occurred
      Returns:
      the result
    • newResult

      public HttpResponseEncoder.Result newResult(boolean overflow, boolean underflow, boolean closeConnection)
      Create a new (preliminary) result.

      This is invoked by the base class. We cannot supply the missing information yet. If necessary the result will be modified in HttpResponseEncoder.encode(Buffer, ByteBuffer, boolean).

      Overrides:
      newResult in class HttpEncoder.Result.Factory
      Parameters:
      overflow - true if the data didn’t fit in the out buffer
      underflow - true if more data is expected
      closeConnection - true if the connection should be closed
      Returns:
      the result