Package io.smallrye.health.checks
Class SocketHealthCheck
java.lang.Object
io.smallrye.health.checks.SocketHealthCheck
- All Implemented Interfaces:
org.eclipse.microprofile.health.HealthCheck
public class SocketHealthCheck
extends Object
implements org.eclipse.microprofile.health.HealthCheck
Health check implementation to check if host is reachable using a socket.
@Produces
@ApplicationScoped
@Liveness
HealthCheck check1() {
return new SocketHealthCheck("192.168.0.2", 5432);
}
- See Also:
-
Constructor Details
-
SocketHealthCheck
-
-
Method Details
-
call
public org.eclipse.microprofile.health.HealthCheckResponse call()- Specified by:
callin interfaceorg.eclipse.microprofile.health.HealthCheck
-
name
Sets the name of the health check.- Parameters:
name- of health check.- Returns:
- SocketHealthCheck instance.
-
timeout
Sets timeout in millis.- Parameters:
timeout- in millis.- Returns:
- SocketHealthCheck instance.
-