public class InetAddressHealthCheck extends Object implements org.eclipse.microprofile.health.HealthCheck
java.net.InetAddress.isReachable method.
@Produces
@ApplicationScoped
@Liveness
HealthCheck check1() {
return new InetAddressHealthCheck("service.com");
}
InetAddress| Constructor and Description |
|---|
InetAddressHealthCheck(String host) |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.microprofile.health.HealthCheckResponse |
call() |
InetAddressHealthCheck |
name(String name)
Sets the name of the health check.
|
InetAddressHealthCheck |
timeout(int timeout)
Sets timeout in millis.
|
public InetAddressHealthCheck(String host)
public org.eclipse.microprofile.health.HealthCheckResponse call()
call in interface org.eclipse.microprofile.health.HealthCheckpublic InetAddressHealthCheck timeout(int timeout)
timeout - in millis.public InetAddressHealthCheck name(String name)
name - of health check.Copyright © 2018–2022. All rights reserved.