Class AbstractHttpClient

  • All Implemented Interfaces:
    io.vertx.core.http.HttpClient, io.vertx.core.metrics.Measured
    Direct Known Subclasses:
    LocalHttpClient

    public abstract class AbstractHttpClient
    extends Object
    implements io.vertx.core.http.HttpClient
    Base class with empty method implementations.
    Author:
    https://github.com/lbovet [Laurent Bovet]
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      io.vertx.core.Future<Void> close()  
      void close​(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)  
      io.vertx.core.http.HttpClient connectionHandler​(io.vertx.core.Handler<io.vertx.core.http.HttpConnection> handler)  
      protected abstract io.vertx.core.http.HttpClientRequest doRequest​(io.vertx.core.http.HttpMethod method, String uri)  
      io.vertx.core.http.HttpClientRequest get​(String uri)  
      io.vertx.core.http.HttpClientRequest head​(String uri)  
      boolean isMetricsEnabled()  
      io.vertx.core.http.HttpClientRequest options​(String uri)  
      io.vertx.core.http.HttpClientRequest post​(String uri)  
      Function<io.vertx.core.http.HttpClientResponse,​io.vertx.core.Future<io.vertx.core.http.RequestOptions>> redirectHandler()  
      io.vertx.core.http.HttpClient redirectHandler​(Function<io.vertx.core.http.HttpClientResponse,​io.vertx.core.Future<io.vertx.core.http.RequestOptions>> function)  
      io.vertx.core.Future<io.vertx.core.http.HttpClientRequest> request​(io.vertx.core.http.HttpMethod httpMethod, int i, String s, String s1)  
      void request​(io.vertx.core.http.HttpMethod httpMethod, int i, String s, String s1, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientRequest>> handler)  
      io.vertx.core.Future<io.vertx.core.http.HttpClientRequest> request​(io.vertx.core.http.HttpMethod httpMethod, String requestURI)  
      void request​(io.vertx.core.http.HttpMethod method, String requestURI, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientRequest>> handler)  
      io.vertx.core.Future<io.vertx.core.http.HttpClientRequest> request​(io.vertx.core.http.HttpMethod httpMethod, String s, String s1)  
      void request​(io.vertx.core.http.HttpMethod httpMethod, String s, String s1, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientRequest>> handler)  
      io.vertx.core.Future<io.vertx.core.http.HttpClientRequest> request​(io.vertx.core.http.RequestOptions requestOptions)  
      void request​(io.vertx.core.http.RequestOptions requestOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientRequest>> handler)  
      io.vertx.core.Future<io.vertx.core.http.WebSocket> webSocket​(int i, String s, String s1)  
      void webSocket​(int i, String s, String s1, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.WebSocket>> handler)  
      io.vertx.core.Future<io.vertx.core.http.WebSocket> webSocket​(io.vertx.core.http.WebSocketConnectOptions webSocketConnectOptions)  
      void webSocket​(io.vertx.core.http.WebSocketConnectOptions webSocketConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.WebSocket>> handler)  
      io.vertx.core.Future<io.vertx.core.http.WebSocket> webSocket​(String s)  
      void webSocket​(String s, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.WebSocket>> handler)  
      io.vertx.core.Future<io.vertx.core.http.WebSocket> webSocket​(String s, String s1)  
      void webSocket​(String s, String s1, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.WebSocket>> handler)  
      io.vertx.core.Future<io.vertx.core.http.WebSocket> webSocketAbs​(String s, io.vertx.core.MultiMap multiMap, io.vertx.core.http.WebsocketVersion websocketVersion, List<String> list)  
      void webSocketAbs​(String s, io.vertx.core.MultiMap multiMap, io.vertx.core.http.WebsocketVersion websocketVersion, List<String> list, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.WebSocket>> handler)  
    • Constructor Detail

      • AbstractHttpClient

        public AbstractHttpClient()
    • Method Detail

      • doRequest

        protected abstract io.vertx.core.http.HttpClientRequest doRequest​(io.vertx.core.http.HttpMethod method,
                                                                          String uri)
      • options

        public io.vertx.core.http.HttpClientRequest options​(String uri)
      • get

        public io.vertx.core.http.HttpClientRequest get​(String uri)
      • head

        public io.vertx.core.http.HttpClientRequest head​(String uri)
      • post

        public io.vertx.core.http.HttpClientRequest post​(String uri)
      • connectionHandler

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

        public io.vertx.core.http.HttpClient redirectHandler​(Function<io.vertx.core.http.HttpClientResponse,​io.vertx.core.Future<io.vertx.core.http.RequestOptions>> function)
        Specified by:
        redirectHandler in interface io.vertx.core.http.HttpClient
      • redirectHandler

        public Function<io.vertx.core.http.HttpClientResponse,​io.vertx.core.Future<io.vertx.core.http.RequestOptions>> redirectHandler()
        Specified by:
        redirectHandler in interface io.vertx.core.http.HttpClient
      • close

        public void close​(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
        Specified by:
        close in interface io.vertx.core.http.HttpClient
      • close

        public io.vertx.core.Future<Void> close()
        Specified by:
        close in interface io.vertx.core.http.HttpClient
      • request

        public void request​(io.vertx.core.http.RequestOptions requestOptions,
                            io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientRequest>> handler)
        Specified by:
        request in interface io.vertx.core.http.HttpClient
      • request

        public io.vertx.core.Future<io.vertx.core.http.HttpClientRequest> request​(io.vertx.core.http.RequestOptions requestOptions)
        Specified by:
        request in interface io.vertx.core.http.HttpClient
      • request

        public void request​(io.vertx.core.http.HttpMethod httpMethod,
                            int i,
                            String s,
                            String s1,
                            io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientRequest>> handler)
        Specified by:
        request in interface io.vertx.core.http.HttpClient
      • request

        public io.vertx.core.Future<io.vertx.core.http.HttpClientRequest> request​(io.vertx.core.http.HttpMethod httpMethod,
                                                                                  int i,
                                                                                  String s,
                                                                                  String s1)
        Specified by:
        request in interface io.vertx.core.http.HttpClient
      • request

        public void request​(io.vertx.core.http.HttpMethod httpMethod,
                            String s,
                            String s1,
                            io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientRequest>> handler)
        Specified by:
        request in interface io.vertx.core.http.HttpClient
      • request

        public io.vertx.core.Future<io.vertx.core.http.HttpClientRequest> request​(io.vertx.core.http.HttpMethod httpMethod,
                                                                                  String s,
                                                                                  String s1)
        Specified by:
        request in interface io.vertx.core.http.HttpClient
      • request

        public void request​(io.vertx.core.http.HttpMethod method,
                            String requestURI,
                            io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientRequest>> handler)
        Specified by:
        request in interface io.vertx.core.http.HttpClient
      • request

        public io.vertx.core.Future<io.vertx.core.http.HttpClientRequest> request​(io.vertx.core.http.HttpMethod httpMethod,
                                                                                  String requestURI)
        Specified by:
        request in interface io.vertx.core.http.HttpClient
      • webSocket

        public void webSocket​(int i,
                              String s,
                              String s1,
                              io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.WebSocket>> handler)
        Specified by:
        webSocket in interface io.vertx.core.http.HttpClient
      • webSocket

        public io.vertx.core.Future<io.vertx.core.http.WebSocket> webSocket​(int i,
                                                                            String s,
                                                                            String s1)
        Specified by:
        webSocket in interface io.vertx.core.http.HttpClient
      • webSocket

        public void webSocket​(String s,
                              String s1,
                              io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.WebSocket>> handler)
        Specified by:
        webSocket in interface io.vertx.core.http.HttpClient
      • webSocket

        public io.vertx.core.Future<io.vertx.core.http.WebSocket> webSocket​(String s,
                                                                            String s1)
        Specified by:
        webSocket in interface io.vertx.core.http.HttpClient
      • webSocket

        public void webSocket​(String s,
                              io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.WebSocket>> handler)
        Specified by:
        webSocket in interface io.vertx.core.http.HttpClient
      • webSocket

        public io.vertx.core.Future<io.vertx.core.http.WebSocket> webSocket​(String s)
        Specified by:
        webSocket in interface io.vertx.core.http.HttpClient
      • webSocket

        public void webSocket​(io.vertx.core.http.WebSocketConnectOptions webSocketConnectOptions,
                              io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.WebSocket>> handler)
        Specified by:
        webSocket in interface io.vertx.core.http.HttpClient
      • webSocket

        public io.vertx.core.Future<io.vertx.core.http.WebSocket> webSocket​(io.vertx.core.http.WebSocketConnectOptions webSocketConnectOptions)
        Specified by:
        webSocket in interface io.vertx.core.http.HttpClient
      • webSocketAbs

        public void webSocketAbs​(String s,
                                 io.vertx.core.MultiMap multiMap,
                                 io.vertx.core.http.WebsocketVersion websocketVersion,
                                 List<String> list,
                                 io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.WebSocket>> handler)
        Specified by:
        webSocketAbs in interface io.vertx.core.http.HttpClient
      • webSocketAbs

        public io.vertx.core.Future<io.vertx.core.http.WebSocket> webSocketAbs​(String s,
                                                                               io.vertx.core.MultiMap multiMap,
                                                                               io.vertx.core.http.WebsocketVersion websocketVersion,
                                                                               List<String> list)
        Specified by:
        webSocketAbs in interface io.vertx.core.http.HttpClient
      • isMetricsEnabled

        public boolean isMetricsEnabled()
        Specified by:
        isMetricsEnabled in interface io.vertx.core.metrics.Measured