public class SocketHealthCheck extends Object implements org.eclipse.microprofile.health.HealthCheck
@Produces
@ApplicationScoped
@Liveness
HealthCheck check1() {
return new SocketHealthCheck("192.168.0.2", 5432);
}
Socket| Constructor and Description |
|---|
SocketHealthCheck(String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.microprofile.health.HealthCheckResponse |
call() |
SocketHealthCheck |
name(String name)
Sets the name of the health check.
|
SocketHealthCheck |
timeout(int timeout)
Sets timeout in millis.
|
public SocketHealthCheck(String host, int port)
public org.eclipse.microprofile.health.HealthCheckResponse call()
call in interface org.eclipse.microprofile.health.HealthCheckpublic SocketHealthCheck name(String name)
name - of health check.public SocketHealthCheck timeout(int timeout)
timeout - in millis.Copyright © 2018–2021. All rights reserved.