Class LocalHttpClientRequest

  • All Implemented Interfaces:
    io.vertx.core.http.HttpClientRequest, io.vertx.core.streams.ReadStream<io.vertx.core.http.HttpClientResponse>, io.vertx.core.streams.StreamBase, io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>, FastFailHttpClientRequest

    public class LocalHttpClientRequest
    extends BufferBridge
    implements FastFailHttpClientRequest
    Bridges a HttpClientRequest to a HttpServerRequest sent to a request handler.
    Author:
    https://github.com/lbovet [Laurent Bovet]
    • Constructor Summary

      Constructors 
      Constructor Description
      LocalHttpClientRequest​(io.vertx.core.http.HttpMethod method, java.lang.String uri, io.vertx.core.Vertx vertx, io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> routingContextHandler, io.vertx.core.http.HttpServerResponse response)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String absoluteURI()  
      io.vertx.core.http.HttpConnection connection()  
      io.vertx.core.http.HttpClientRequest connectionHandler​(io.vertx.core.Handler<io.vertx.core.http.HttpConnection> handler)  
      io.vertx.core.http.HttpClientRequest drainHandler​(io.vertx.core.Handler<java.lang.Void> handler)  
      void end()  
      void end​(io.vertx.core.buffer.Buffer chunk)  
      void end​(java.lang.String chunk)  
      void end​(java.lang.String chunk, java.lang.String enc)  
      io.vertx.core.http.HttpClientRequest exceptionHandler​(io.vertx.core.Handler<java.lang.Throwable> handler)  
      java.lang.String getHost()  
      java.lang.String getRawMethod()  
      io.vertx.core.MultiMap headers()  
      boolean isChunked()  
      io.vertx.core.http.HttpMethod method()  
      java.lang.String path()  
      io.vertx.core.http.HttpClientRequest pushHandler​(io.vertx.core.Handler<io.vertx.core.http.HttpClientRequest> handler)  
      io.vertx.core.http.HttpClientRequest putHeader​(java.lang.CharSequence name, java.lang.CharSequence value)  
      io.vertx.core.http.HttpClientRequest putHeader​(java.lang.CharSequence name, java.lang.Iterable<java.lang.CharSequence> values)  
      io.vertx.core.http.HttpClientRequest putHeader​(java.lang.String name, java.lang.Iterable<java.lang.String> values)  
      io.vertx.core.http.HttpClientRequest putHeader​(java.lang.String name, java.lang.String value)  
      java.lang.String query()  
      boolean reset()  
      boolean reset​(long code)  
      io.vertx.core.http.HttpClientRequest sendHead()  
      io.vertx.core.http.HttpClientRequest sendHead​(io.vertx.core.Handler<io.vertx.core.http.HttpVersion> completionHandler)  
      io.vertx.core.http.HttpClientRequest setChunked​(boolean chunked)  
      io.vertx.core.http.HttpClientRequest setHost​(java.lang.String host)  
      void setMethod​(io.vertx.core.http.HttpMethod method)  
      io.vertx.core.http.HttpClientRequest setRawMethod​(java.lang.String method)  
      io.vertx.core.http.HttpClientRequest setTimeout​(long timeoutMs)  
      void setUri​(java.lang.String uri)  
      io.vertx.core.http.HttpClientRequest setWriteQueueMaxSize​(int maxSize)  
      java.lang.String uri()  
      io.vertx.core.http.HttpClientRequest write​(io.vertx.core.buffer.Buffer chunk)  
      io.vertx.core.http.HttpClientRequest write​(java.lang.String chunk)  
      io.vertx.core.http.HttpClientRequest write​(java.lang.String chunk, java.lang.String enc)  
      io.vertx.core.http.HttpClientRequest writeCustomFrame​(int type, int flags, io.vertx.core.buffer.Buffer payload)  
      boolean writeQueueFull()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.vertx.core.http.HttpClientRequest

        setStreamPriority, streamId, writeCustomFrame
    • Constructor Detail

      • LocalHttpClientRequest

        public LocalHttpClientRequest​(io.vertx.core.http.HttpMethod method,
                                      java.lang.String uri,
                                      io.vertx.core.Vertx vertx,
                                      io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> routingContextHandler,
                                      io.vertx.core.http.HttpServerResponse response)
    • Method Detail

      • setChunked

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

        public boolean isChunked()
        Specified by:
        isChunked in interface FastFailHttpClientRequest
        Specified by:
        isChunked in interface io.vertx.core.http.HttpClientRequest
      • method

        public io.vertx.core.http.HttpMethod method()
        Specified by:
        method in interface FastFailHttpClientRequest
        Specified by:
        method in interface io.vertx.core.http.HttpClientRequest
      • getRawMethod

        public java.lang.String getRawMethod()
        Specified by:
        getRawMethod in interface FastFailHttpClientRequest
        Specified by:
        getRawMethod in interface io.vertx.core.http.HttpClientRequest
      • setRawMethod

        public io.vertx.core.http.HttpClientRequest setRawMethod​(java.lang.String method)
        Specified by:
        setRawMethod in interface FastFailHttpClientRequest
        Specified by:
        setRawMethod in interface io.vertx.core.http.HttpClientRequest
      • absoluteURI

        public java.lang.String absoluteURI()
        Specified by:
        absoluteURI in interface FastFailHttpClientRequest
        Specified by:
        absoluteURI in interface io.vertx.core.http.HttpClientRequest
      • uri

        public java.lang.String uri()
        Specified by:
        uri in interface FastFailHttpClientRequest
        Specified by:
        uri in interface io.vertx.core.http.HttpClientRequest
      • path

        public java.lang.String path()
        Specified by:
        path in interface FastFailHttpClientRequest
        Specified by:
        path in interface io.vertx.core.http.HttpClientRequest
      • query

        public java.lang.String query()
        Specified by:
        query in interface FastFailHttpClientRequest
        Specified by:
        query in interface io.vertx.core.http.HttpClientRequest
      • setHost

        public io.vertx.core.http.HttpClientRequest setHost​(java.lang.String host)
        Specified by:
        setHost in interface FastFailHttpClientRequest
        Specified by:
        setHost in interface io.vertx.core.http.HttpClientRequest
      • getHost

        public java.lang.String getHost()
        Specified by:
        getHost in interface FastFailHttpClientRequest
        Specified by:
        getHost in interface io.vertx.core.http.HttpClientRequest
      • headers

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

        public io.vertx.core.http.HttpClientRequest putHeader​(java.lang.String name,
                                                              java.lang.String value)
        Specified by:
        putHeader in interface FastFailHttpClientRequest
        Specified by:
        putHeader in interface io.vertx.core.http.HttpClientRequest
      • putHeader

        public io.vertx.core.http.HttpClientRequest putHeader​(java.lang.CharSequence name,
                                                              java.lang.CharSequence value)
        Specified by:
        putHeader in interface FastFailHttpClientRequest
        Specified by:
        putHeader in interface io.vertx.core.http.HttpClientRequest
      • putHeader

        public io.vertx.core.http.HttpClientRequest putHeader​(java.lang.String name,
                                                              java.lang.Iterable<java.lang.String> values)
        Specified by:
        putHeader in interface FastFailHttpClientRequest
        Specified by:
        putHeader in interface io.vertx.core.http.HttpClientRequest
      • putHeader

        public io.vertx.core.http.HttpClientRequest putHeader​(java.lang.CharSequence name,
                                                              java.lang.Iterable<java.lang.CharSequence> values)
        Specified by:
        putHeader in interface FastFailHttpClientRequest
        Specified by:
        putHeader in interface io.vertx.core.http.HttpClientRequest
      • write

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

        public io.vertx.core.http.HttpClientRequest write​(java.lang.String chunk)
        Specified by:
        write in interface FastFailHttpClientRequest
        Specified by:
        write in interface io.vertx.core.http.HttpClientRequest
      • write

        public io.vertx.core.http.HttpClientRequest write​(java.lang.String chunk,
                                                          java.lang.String enc)
        Specified by:
        write in interface FastFailHttpClientRequest
        Specified by:
        write in interface io.vertx.core.http.HttpClientRequest
      • sendHead

        public io.vertx.core.http.HttpClientRequest sendHead()
        Specified by:
        sendHead in interface FastFailHttpClientRequest
        Specified by:
        sendHead in interface io.vertx.core.http.HttpClientRequest
      • sendHead

        public io.vertx.core.http.HttpClientRequest sendHead​(io.vertx.core.Handler<io.vertx.core.http.HttpVersion> completionHandler)
        Specified by:
        sendHead in interface FastFailHttpClientRequest
        Specified by:
        sendHead in interface io.vertx.core.http.HttpClientRequest
      • end

        public void end​(java.lang.String chunk)
        Specified by:
        end in interface FastFailHttpClientRequest
        Specified by:
        end in interface io.vertx.core.http.HttpClientRequest
      • end

        public void end​(java.lang.String chunk,
                        java.lang.String enc)
        Specified by:
        end in interface FastFailHttpClientRequest
        Specified by:
        end in interface io.vertx.core.http.HttpClientRequest
      • end

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

        public void end()
        Specified by:
        end in interface FastFailHttpClientRequest
        Specified by:
        end in interface io.vertx.core.http.HttpClientRequest
        Specified by:
        end in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
      • setTimeout

        public io.vertx.core.http.HttpClientRequest setTimeout​(long timeoutMs)
        Specified by:
        setTimeout in interface FastFailHttpClientRequest
        Specified by:
        setTimeout in interface io.vertx.core.http.HttpClientRequest
      • pushHandler

        public io.vertx.core.http.HttpClientRequest pushHandler​(io.vertx.core.Handler<io.vertx.core.http.HttpClientRequest> handler)
        Specified by:
        pushHandler in interface FastFailHttpClientRequest
        Specified by:
        pushHandler in interface io.vertx.core.http.HttpClientRequest
      • reset

        public boolean reset()
        Specified by:
        reset in interface io.vertx.core.http.HttpClientRequest
      • reset

        public boolean reset​(long code)
        Specified by:
        reset in interface FastFailHttpClientRequest
        Specified by:
        reset in interface io.vertx.core.http.HttpClientRequest
      • connection

        public io.vertx.core.http.HttpConnection connection()
        Specified by:
        connection in interface FastFailHttpClientRequest
        Specified by:
        connection in interface io.vertx.core.http.HttpClientRequest
      • connectionHandler

        public io.vertx.core.http.HttpClientRequest connectionHandler​(io.vertx.core.Handler<io.vertx.core.http.HttpConnection> handler)
        Specified by:
        connectionHandler in interface FastFailHttpClientRequest
        Specified by:
        connectionHandler in interface io.vertx.core.http.HttpClientRequest
      • writeCustomFrame

        public io.vertx.core.http.HttpClientRequest writeCustomFrame​(int type,
                                                                     int flags,
                                                                     io.vertx.core.buffer.Buffer payload)
        Specified by:
        writeCustomFrame in interface FastFailHttpClientRequest
        Specified by:
        writeCustomFrame in interface io.vertx.core.http.HttpClientRequest
      • setWriteQueueMaxSize

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

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

        public io.vertx.core.http.HttpClientRequest drainHandler​(io.vertx.core.Handler<java.lang.Void> handler)
        Specified by:
        drainHandler in interface FastFailHttpClientRequest
        Specified by:
        drainHandler in interface io.vertx.core.http.HttpClientRequest
        Specified by:
        drainHandler in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
      • exceptionHandler

        public io.vertx.core.http.HttpClientRequest exceptionHandler​(io.vertx.core.Handler<java.lang.Throwable> handler)
        Specified by:
        exceptionHandler in interface FastFailHttpClientRequest
        Specified by:
        exceptionHandler in interface io.vertx.core.http.HttpClientRequest
        Specified by:
        exceptionHandler in interface io.vertx.core.streams.ReadStream<io.vertx.core.http.HttpClientResponse>
        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>
      • setMethod

        public void setMethod​(io.vertx.core.http.HttpMethod method)
      • setUri

        public void setUri​(java.lang.String uri)