com.netflix.karyon.server.eureka
Class SyncHealthCheckInvocationStrategy

java.lang.Object
  extended by com.netflix.karyon.server.eureka.SyncHealthCheckInvocationStrategy
All Implemented Interfaces:
HealthCheckInvocationStrategy

public class SyncHealthCheckInvocationStrategy
extends java.lang.Object
implements HealthCheckInvocationStrategy

An implementation of HealthCheckInvocationStrategy that synchronously calls the underlying HealthCheckHandler.


Constructor Summary
SyncHealthCheckInvocationStrategy(HealthCheckHandler handler)
           
 
Method Summary
 HealthCheckHandler getHandler()
          Returns the instance of HealthCheckHandler associated with this strategy.
 int invokeCheck()
          Invokes the handler associated with this strategy and returns the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncHealthCheckInvocationStrategy

@Inject
public SyncHealthCheckInvocationStrategy(HealthCheckHandler handler)
Method Detail

invokeCheck

public int invokeCheck()
                throws java.util.concurrent.TimeoutException
Description copied from interface: HealthCheckInvocationStrategy
Invokes the handler associated with this strategy and returns the response. This method may block waiting for results.
If this strategy supports timeouts, this call must not wait more than the timeout value.

Specified by:
invokeCheck in interface HealthCheckInvocationStrategy
Returns:
The health check result.
Throws:
java.util.concurrent.TimeoutException - If the healthcheck did not return after the stipulated time (governed entirely by this strategy implementation)

getHandler

public HealthCheckHandler getHandler()
Description copied from interface: HealthCheckInvocationStrategy
Returns the instance of HealthCheckHandler associated with this strategy.

Specified by:
getHandler in interface HealthCheckInvocationStrategy
Returns:
The instance of HealthCheckHandler associated with this strategy.