Package brave.http

Class HttpServerResponse


  • public abstract class HttpServerResponse
    extends HttpResponse
    Marks an interface for use in HttpServerHandler#handleSend(Object, Throwable, Span). This gives a standard type to consider when parsing an outgoing context.
    Since:
    5.7
    See Also:
    HttpServerRequest
    • Constructor Detail

      • HttpServerResponse

        public HttpServerResponse()
    • Method Detail

      • spanKind

        public final brave.Span.Kind spanKind()
        Specified by:
        spanKind in class brave.Response
      • request

        @Nullable
        public HttpServerRequest request()
        The request that initiated this HTTP response or null if unknown.

        Implementations should return the last wire-level request that caused this response or error. HTTP properties like path and headers might be different, due to redirects or authentication. Some properties might not be visible until response processing, notably HttpResponse.route().

        Overrides:
        request in class HttpResponse
      • error

        public Throwable error()
        Specified by:
        error in class brave.Response