java.lang.Object
com.github.nhenneaux.resilienthttpclient.singlehostclient.ServerConfiguration

public class ServerConfiguration extends Object
  • Constructor Details

    • ServerConfiguration

      public ServerConfiguration(String hostname)
    • ServerConfiguration

      public ServerConfiguration(String hostname, int port)
    • ServerConfiguration

      public ServerConfiguration(String hostname, int port, String healthPath, long dnsLookupRefreshPeriodInSeconds, long connectionHealthCheckPeriodInSeconds, long readTimeoutInMilliseconds)
  • Method Details

    • getHostname

      public String getHostname()
      The hostname of the HTTP client.
    • getPort

      public int getPort()
      The TCP port of the HTTP client, -1 if the port is not set.
    • getHealthPath

      public String getHealthPath()
      The health path responding with HTTP code 2xx, 3xx, 4xx so that the client is considered healthy.
    • getDnsLookupRefreshPeriodInSeconds

      public long getDnsLookupRefreshPeriodInSeconds()
      The DNS delay in seconds to refresh the resolution of getHostname().
    • getConnectionHealthCheckPeriodInSeconds

      public long getConnectionHealthCheckPeriodInSeconds()
      The delay in seconds between health checks to getHealthPath().
    • getReadTimeoutInMilliseconds

      public long getReadTimeoutInMilliseconds()
      The read timeout in ms. By default it has a value of "-1" which interpreted as no read timeout specified.
    • toString

      public String toString()
      Overrides:
      toString in class Object