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 boolean
equals(java.lang.Object o)
java.lang.String
getPath()
java.lang.Integer
getPort()
java.lang.Integer
getStatusCode()
java.lang.String
getVhost()
int
hashCode()
-
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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-