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