Class LocalHttpServerResponse

  • All Implemented Interfaces:
    io.vertx.core.http.HttpServerResponse, io.vertx.core.streams.StreamBase, io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>, FastFailHttpServerResponse

    public class LocalHttpServerResponse
    extends BufferBridge
    implements FastFailHttpServerResponse
    Bridges the reponses of a LocalHttpClientRequest.
    Author:
    https://github.com/lbovet [Laurent Bovet]
    • Constructor Detail

      • LocalHttpServerResponse

        public LocalHttpServerResponse​(io.vertx.core.Vertx vertx,
                                       io.vertx.core.Handler<io.vertx.core.http.HttpClientResponse> responseHandler)
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Specified by:
        getStatusCode in interface FastFailHttpServerResponse
        Specified by:
        getStatusCode in interface io.vertx.core.http.HttpServerResponse
      • setStatusCode

        public io.vertx.core.http.HttpServerResponse setStatusCode​(int statusCode)
        Specified by:
        setStatusCode in interface FastFailHttpServerResponse
        Specified by:
        setStatusCode in interface io.vertx.core.http.HttpServerResponse
      • setStatusMessage

        public io.vertx.core.http.HttpServerResponse setStatusMessage​(String statusMessage)
        Specified by:
        setStatusMessage in interface FastFailHttpServerResponse
        Specified by:
        setStatusMessage in interface io.vertx.core.http.HttpServerResponse
      • setChunked

        public io.vertx.core.http.HttpServerResponse setChunked​(boolean chunked)
        Specified by:
        setChunked in interface FastFailHttpServerResponse
        Specified by:
        setChunked in interface io.vertx.core.http.HttpServerResponse
      • isChunked

        public boolean isChunked()
        Specified by:
        isChunked in interface FastFailHttpServerResponse
        Specified by:
        isChunked in interface io.vertx.core.http.HttpServerResponse
      • headers

        public io.vertx.core.MultiMap headers()
        Specified by:
        headers in interface FastFailHttpServerResponse
        Specified by:
        headers in interface io.vertx.core.http.HttpServerResponse
      • putHeader

        public io.vertx.core.http.HttpServerResponse putHeader​(String name,
                                                               String value)
        Specified by:
        putHeader in interface FastFailHttpServerResponse
        Specified by:
        putHeader in interface io.vertx.core.http.HttpServerResponse
      • closeHandler

        public io.vertx.core.http.HttpServerResponse closeHandler​(io.vertx.core.Handler<Void> handler)
        Specified by:
        closeHandler in interface FastFailHttpServerResponse
        Specified by:
        closeHandler in interface io.vertx.core.http.HttpServerResponse
      • write

        public io.vertx.core.http.HttpServerResponse write​(io.vertx.core.buffer.Buffer chunk)
        Specified by:
        write in interface FastFailHttpServerResponse
        Specified by:
        write in interface io.vertx.core.http.HttpServerResponse
        Specified by:
        write in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
      • write

        public io.vertx.core.http.HttpServerResponse write​(String chunk,
                                                           String enc)
        Specified by:
        write in interface FastFailHttpServerResponse
        Specified by:
        write in interface io.vertx.core.http.HttpServerResponse
      • write

        public io.vertx.core.http.HttpServerResponse write​(String chunk)
        Specified by:
        write in interface FastFailHttpServerResponse
        Specified by:
        write in interface io.vertx.core.http.HttpServerResponse
      • end

        public void end​(io.vertx.core.buffer.Buffer chunk)
        Specified by:
        end in interface FastFailHttpServerResponse
        Specified by:
        end in interface io.vertx.core.http.HttpServerResponse
        Specified by:
        end in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
      • end

        public void end()
        Specified by:
        end in interface FastFailHttpServerResponse
        Specified by:
        end in interface io.vertx.core.http.HttpServerResponse
        Specified by:
        end in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
      • close

        public void close()
        Specified by:
        close in interface FastFailHttpServerResponse
        Specified by:
        close in interface io.vertx.core.http.HttpServerResponse
      • ended

        public boolean ended()
        Specified by:
        ended in interface FastFailHttpServerResponse
        Specified by:
        ended in interface io.vertx.core.http.HttpServerResponse
      • closed

        public boolean closed()
        Specified by:
        closed in interface FastFailHttpServerResponse
        Specified by:
        closed in interface io.vertx.core.http.HttpServerResponse
      • headWritten

        public boolean headWritten()
        Specified by:
        headWritten in interface FastFailHttpServerResponse
        Specified by:
        headWritten in interface io.vertx.core.http.HttpServerResponse
      • setWriteQueueMaxSize

        public io.vertx.core.http.HttpServerResponse setWriteQueueMaxSize​(int maxSize)
        Specified by:
        setWriteQueueMaxSize in interface FastFailHttpServerResponse
        Specified by:
        setWriteQueueMaxSize in interface io.vertx.core.http.HttpServerResponse
        Specified by:
        setWriteQueueMaxSize in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
      • writeQueueFull

        public boolean writeQueueFull()
        Specified by:
        writeQueueFull in interface FastFailHttpServerResponse
        Specified by:
        writeQueueFull in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
      • exceptionHandler

        public io.vertx.core.http.HttpServerResponse exceptionHandler​(io.vertx.core.Handler<Throwable> handler)
        Specified by:
        exceptionHandler in interface FastFailHttpServerResponse
        Specified by:
        exceptionHandler in interface io.vertx.core.http.HttpServerResponse
        Specified by:
        exceptionHandler in interface io.vertx.core.streams.StreamBase
        Specified by:
        exceptionHandler in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>