public class UrlHealthCheck extends Object implements org.eclipse.microprofile.health.HealthCheck
@Produces
@ApplicationScoped
@Liveness
HealthCheck check1() {
return new UrlHealthCheck("www.google.com");
}
Socket| Constructor and Description |
|---|
UrlHealthCheck(String url) |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.microprofile.health.HealthCheckResponse |
call() |
UrlHealthCheck |
name(String name)
Sets the name of the health check.
|
UrlHealthCheck |
requestMethod(String requestMethod)
Sets the request method to be used (ie GET, POST, PUT, ...)
|
UrlHealthCheck |
statusCode(int statusCode)
Sets the expected status code to be returned as valid.
|
UrlHealthCheck |
timeout(int timeout)
Sets timeout in millis.
|
public UrlHealthCheck(String url)
public org.eclipse.microprofile.health.HealthCheckResponse call()
call in interface org.eclipse.microprofile.health.HealthCheckpublic UrlHealthCheck name(String name)
name - of health check.public UrlHealthCheck timeout(int timeout)
timeout - in millis.public UrlHealthCheck statusCode(int statusCode)
statusCode - expected.public UrlHealthCheck requestMethod(String requestMethod)
requestMethod - to use.Copyright © 2018–2022. All rights reserved.