Interface HttpProxyServer

All Known Implementing Classes:
DefaultHttpProxyServer

public interface HttpProxyServer
Interface for the top-level proxy server class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Stops the server and all related clones immediately, without waiting for traffic to stop.
    Clone the existing server, with a port 1 higher and everything else the same.
    int
    Returns the maximum time to wait, in milliseconds, to connect to a server.
    int
     
    Return the address on which this proxy is listening.
    void
    setConnectTimeout(int connectTimeoutMs)
    Sets the maximum time to wait, in milliseconds, to connect to a server.
    void
    setIdleConnectionTimeout(int idleConnectionTimeout)
     
    void
    setThrottle(long readThrottleBytesPerSecond, long writeThrottleBytesPerSecond)
    Set the read/write throttle bandwidths (in bytes/second) for this proxy.
    void
    Stops the server and all related clones.
  • Method Details

    • getIdleConnectionTimeout

      int getIdleConnectionTimeout()
    • setIdleConnectionTimeout

      void setIdleConnectionTimeout(int idleConnectionTimeout)
    • getConnectTimeout

      int getConnectTimeout()
      Returns the maximum time to wait, in milliseconds, to connect to a server.
    • setConnectTimeout

      void setConnectTimeout(int connectTimeoutMs)
      Sets the maximum time to wait, in milliseconds, to connect to a server.
    • clone

      Clone the existing server, with a port 1 higher and everything else the same. If the proxy was started with port 0 (JVM-assigned port), the cloned proxy will also use a JVM-assigned port.

      The new server will share event loops with the original server. The event loops will use whatever name was given to the first server in the clone group. The server group will not terminate until the original server and all clones terminate.

      Returns:
      a bootstrap that allows customizing and starting the cloned server
    • stop

      void stop()
      Stops the server and all related clones. Waits for traffic to stop before shutting down.
    • abort

      void abort()
      Stops the server and all related clones immediately, without waiting for traffic to stop.
    • getListenAddress

      InetSocketAddress getListenAddress()
      Return the address on which this proxy is listening.
    • setThrottle

      void setThrottle(long readThrottleBytesPerSecond, long writeThrottleBytesPerSecond)

      Set the read/write throttle bandwidths (in bytes/second) for this proxy.