Interface NettyHttpResponseBuilder

All Known Implementing Classes:
FullNettyClientHttpResponse, NettyMutableHttpResponse

public interface NettyHttpResponseBuilder
Common interface for client and server to implement to construct the Netty versions of the response objects.
Since:
2.0.0
Author:
graemerocher
  • Method Details

    • toFullHttpResponse

      @NonNull @NonNull io.netty.handler.codec.http.FullHttpResponse toFullHttpResponse()
      Converts this object to a full http response.
      Returns:
      a full http response
    • toStreamHttpResponse

      @NonNull default @NonNull StreamedHttpResponse toStreamHttpResponse()
      Converts this object to a streamed http response.
      Returns:
      The streamed response
    • toHttpResponse

      @NonNull default @NonNull io.netty.handler.codec.http.HttpResponse toHttpResponse()
      Converts this object to the most appropriate http response type.
      Returns:
      The http response
    • isStream

      boolean isStream()
      Returns:
      Is the response a stream.
    • toHttpResponse

      @NonNull static @NonNull io.netty.handler.codec.http.HttpResponse toHttpResponse(@NonNull HttpResponse<?> response)
      Convert the given response to a full http response.
      Parameters:
      response - The response
      Returns:
      The full response.
    • toStreamResponse

      @NonNull static @NonNull StreamedHttpResponse toStreamResponse(@NonNull HttpResponse<?> response)
      Convert the given response to a full http response.
      Parameters:
      response - The response
      Returns:
      The full response.