Class MockWebServer

    • Constructor Detail

      • MockWebServer

        public MockWebServer()
    • Method Detail

      • start

        public void start()
      • start

        public void start​(int port)
      • start

        public void start​(InetAddress inetAddress,
                          int port)
      • shutdown

        public void shutdown()
      • getPort

        public int getPort()
      • getHostName

        public String getHostName()
      • toProxyAddress

        public Proxy toProxyAddress()
      • getSelfSignedCertificate

        public io.vertx.core.net.SelfSignedCertificate getSelfSignedCertificate()
      • getRequestCount

        public int getRequestCount()
      • useHttps

        public void useHttps()
      • setDispatcher

        public void setDispatcher​(Dispatcher dispatcher)
      • setProtocols

        public void setProtocols​(List<Protocol> protocols)
      • setHttp2ClearTextEnabled

        public void setHttp2ClearTextEnabled​(boolean http2ClearTextEnabled)
        Enables or disables HTTP/2 over cleartext (h2c). Enabled by default, matching Vert.x's own default. Set to false for tests that use HTTP clients (such as the JDK HttpClient) which probe for Upgrade: h2c — accepting the upgrade can lead to non-deterministic HTTP/2 framing behaviour on large responses.
      • reset

        public final void reset()
        Returns the MockWebServer to its initial state by:
        • Clearing the request count.
        • Clearing the request queue.