Class HttpHealthCheck

java.lang.Object
com.structurizr.model.HttpHealthCheck
All Implemented Interfaces:
Comparable<HttpHealthCheck>

public final class HttpHealthCheck extends Object implements Comparable<HttpHealthCheck>
Describes a HTTP based health check.
  • Method Details

    • getName

      public String getName()
      Gets the name of this health check.
      Returns:
      the name, as a String
    • getUrl

      public String getUrl()
      Gets the URL for this health check.
      Returns:
      the URL, as a String
    • addHeader

      public void addHeader(String name, String value)
      Adds a HTTP header, which will be sent with the HTTP request to the health check URL.
      Parameters:
      name - the name of the header
      value - the value of the header
    • getHeaders

      public Map<String,String> getHeaders()
      Gets a the HTTP headers associated with this health check.
      Returns:
      a Map (name=value)
    • getInterval

      public int getInterval()
      Gets the polling interval of this health check.
      Returns:
      the polling interval (in seconds), as an integer
    • getTimeout

      public long getTimeout()
      Gets the timeout associated with this health check.
      Returns:
      the timeout (in milliseconds)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(HttpHealthCheck healthCheck)
      Specified by:
      compareTo in interface Comparable<HttpHealthCheck>