/** * Registers the readiness and liveness checks of the given service. * * @param serviceInstance instance of the service which's checks should be registered. */ @Override public void registerHealthCheckResources(final HealthCheckProvider serviceInstance) { serviceInstance.registerLivenessChecks(livenessHandler); serviceInstance.registerReadinessChecks(readinessHandler); }
/** * Registers the readiness and liveness checks of the given service if health check is configured, otherwise does * nothing. * * @param serviceInstance instance of the service which's checks should be registered. */ public void registerHealthCheckResources(final HealthCheckProvider serviceInstance) { if (router != null) { serviceInstance.registerLivenessChecks(livenessHandler); serviceInstance.registerReadinessChecks(readinessHandler); } // else: health check port not configured. }