Class HttpHealthCheck
- java.lang.Object
-
- uk.co.ractf.polaris.api.common.JsonRepresentable
-
- uk.co.ractf.polaris.api.healthcheck.HealthCheck
-
- uk.co.ractf.polaris.api.healthcheck.HttpHealthCheck
-
public class HttpHealthCheck extends HealthCheck
Represents a HTTP healthcheck that checks that a http request to the container on a given port with a specified path and vhost returns the given status code{ "id": "http1", "type": "http", "path": "/", "port": 8000, "vhost": "ractf.co.uk", "statusCode": 404 }
-
-
Constructor Summary
Constructors Constructor Description HttpHealthCheck(java.lang.String id, java.lang.String type, java.lang.String path, java.lang.Integer port, java.lang.String vhost, java.lang.Integer statusCode)Create a HttpHealthCheck
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetPath()java.lang.IntegergetPort()java.lang.IntegergetStatusCode()java.lang.StringgetVhost()inthashCode()-
Methods inherited from class uk.co.ractf.polaris.api.healthcheck.HealthCheck
getId
-
Methods inherited from class uk.co.ractf.polaris.api.common.JsonRepresentable
parse, toJsonString
-
-
-
-
Constructor Detail
-
HttpHealthCheck
@Contract(pure=true) public HttpHealthCheck(java.lang.String id, java.lang.String type, java.lang.String path, java.lang.Integer port, java.lang.String vhost, java.lang.Integer statusCode)Create a HttpHealthCheck- Parameters:
id- the id of the health checktype- the type of the health check (http)path- the path to make a request onport- the port to make a request onvhost- the vhost to specifystatusCode- the status code to expect
-
-
Method Detail
-
getPath
public java.lang.String getPath()
-
getPort
public java.lang.Integer getPort()
-
getVhost
public java.lang.String getVhost()
-
getStatusCode
public java.lang.Integer getStatusCode()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-