com.orbitz.consul
Class HealthClient

java.lang.Object
  extended by com.orbitz.consul.HealthClient

public class HealthClient
extends java.lang.Object

HTTP Client for /v1/health/ endpoints.


Method Summary
 ConsulResponse<java.util.List<ServiceHealth>> getAllServiceInstances(java.lang.String service)
          Retrieves the healthchecks for all nodes.
 ConsulResponse<java.util.List<ServiceHealth>> getAllServiceInstances(java.lang.String service, CatalogOptions catalogOptions)
          Retrieves the healthchecks for all nodes in a given datacenter.
 ConsulResponse<java.util.List<ServiceHealth>> getAllServiceInstances(java.lang.String service, CatalogOptions catalogOptions, QueryOptions queryOptions)
          Retrieves the healthchecks for all nodes in a given datacenter with QueryOptions.
 void getAllServiceInstances(java.lang.String service, CatalogOptions catalogOptions, QueryOptions queryOptions, ConsulResponseCallback<java.util.List<ServiceHealth>> callback)
          Asynchronously retrieves the healthchecks for all nodes in a given datacenter with QueryOptions.
 ConsulResponse<java.util.List<ServiceHealth>> getAllServiceInstances(java.lang.String service, QueryOptions queryOptions)
          Retrieves the healthchecks for all nodes with QueryOptions.
 void getAllServiceInstances(java.lang.String service, QueryOptions queryOptions, ConsulResponseCallback<java.util.List<ServiceHealth>> callback)
          Asynchronously retrieves the healthchecks for all nodes in a given datacenter with QueryOptions.
 ConsulResponse<java.util.List<HealthCheck>> getChecksByState(State state)
          Retrieves the healthchecks for a state.
 ConsulResponse<java.util.List<HealthCheck>> getChecksByState(State state, CatalogOptions catalogOptions)
          Retrieves the healthchecks for a state in a given datacenter.
 ConsulResponse<java.util.List<HealthCheck>> getChecksByState(State state, CatalogOptions catalogOptions, QueryOptions queryOptions)
          Retrieves the healthchecks for a state in a given datacenter with QueryOptions.
 ConsulResponse<java.util.List<HealthCheck>> getChecksByState(State state, QueryOptions queryOptions)
          Retrieves the healthchecks for a state with QueryOptions.
 ConsulResponse<java.util.List<ServiceHealth>> getHealthyServiceInstances(java.lang.String service)
          Retrieves the healthchecks for all healthy service instances.
 ConsulResponse<java.util.List<ServiceHealth>> getHealthyServiceInstances(java.lang.String service, CatalogOptions catalogOptions)
          Retrieves the healthchecks for all healthy service instances in a given datacenter.
 ConsulResponse<java.util.List<ServiceHealth>> getHealthyServiceInstances(java.lang.String service, CatalogOptions catalogOptions, QueryOptions queryOptions)
          Retrieves the healthchecks for all healthy service instances in a given datacenter with QueryOptions.
 void getHealthyServiceInstances(java.lang.String service, CatalogOptions catalogOptions, QueryOptions queryOptions, ConsulResponseCallback<java.util.List<ServiceHealth>> callback)
          Asynchronously retrieves the healthchecks for all healthy service instances in a given datacenter with QueryOptions.
 ConsulResponse<java.util.List<ServiceHealth>> getHealthyServiceInstances(java.lang.String service, QueryOptions queryOptions)
          Retrieves the healthchecks for all healthy service instances with QueryOptions.
 void getHealthyServiceInstances(java.lang.String service, QueryOptions queryOptions, ConsulResponseCallback<java.util.List<ServiceHealth>> callback)
          Asynchronously retrieves the healthchecks for all healthy service instances in a given datacenter with QueryOptions.
 ConsulResponse<java.util.List<HealthCheck>> getNodeChecks(java.lang.String node)
          Retrieves the healthchecks for a node.
 ConsulResponse<java.util.List<HealthCheck>> getNodeChecks(java.lang.String node, CatalogOptions catalogOptions)
          Retrieves the healthchecks for a node in a given datacenter.
 ConsulResponse<java.util.List<HealthCheck>> getNodeChecks(java.lang.String node, CatalogOptions catalogOptions, QueryOptions queryOptions)
          Retrieves the healthchecks for a node in a given datacenter with QueryOptions.
 ConsulResponse<java.util.List<HealthCheck>> getNodeChecks(java.lang.String node, QueryOptions queryOptions)
          Retrieves the healthchecks for a node with QueryOptions.
 ConsulResponse<java.util.List<HealthCheck>> getServiceChecks(java.lang.String service)
          Retrieves the healthchecks for a service.
 ConsulResponse<java.util.List<HealthCheck>> getServiceChecks(java.lang.String service, CatalogOptions catalogOptions)
          Retrieves the healthchecks for a service in a given datacenter.
 ConsulResponse<java.util.List<HealthCheck>> getServiceChecks(java.lang.String service, CatalogOptions catalogOptions, QueryOptions queryOptions)
          Retrieves the healthchecks for a service in a given datacenter with QueryOptions.
 void getServiceChecks(java.lang.String service, CatalogOptions catalogOptions, QueryOptions queryOptions, ConsulResponseCallback<java.util.List<HealthCheck>> callback)
          Asynchronously retrieves the healthchecks for a service in a given datacenter with QueryOptions.
 ConsulResponse<java.util.List<HealthCheck>> getServiceChecks(java.lang.String service, QueryOptions queryOptions)
          Retrieves the healthchecks for a service with QueryOptions.
 void getServiceChecks(java.lang.String service, QueryOptions queryOptions, ConsulResponseCallback<java.util.List<HealthCheck>> callback)
          Asynchronously retrieves the healthchecks for a service in a given datacenter with QueryOptions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNodeChecks

public ConsulResponse<java.util.List<HealthCheck>> getNodeChecks(java.lang.String node)
Retrieves the healthchecks for a node. GET /v1/health/node/{node}

Returns:
A ConsulResponse containing a list of HealthCheck objects.

getNodeChecks

public ConsulResponse<java.util.List<HealthCheck>> getNodeChecks(java.lang.String node,
                                                                 CatalogOptions catalogOptions)
Retrieves the healthchecks for a node in a given datacenter. GET /v1/health/node/{node}?dc={datacenter}

Parameters:
catalogOptions - The catalog specific options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getNodeChecks

public ConsulResponse<java.util.List<HealthCheck>> getNodeChecks(java.lang.String node,
                                                                 QueryOptions queryOptions)
Retrieves the healthchecks for a node with QueryOptions. GET /v1/health/node/{node}

Parameters:
queryOptions - The Query Options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getNodeChecks

public ConsulResponse<java.util.List<HealthCheck>> getNodeChecks(java.lang.String node,
                                                                 CatalogOptions catalogOptions,
                                                                 QueryOptions queryOptions)
Retrieves the healthchecks for a node in a given datacenter with QueryOptions. GET /v1/health/node/{node}?dc={datacenter}

Parameters:
catalogOptions - The catalog specific options to use.
queryOptions - The Query Options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getServiceChecks

public ConsulResponse<java.util.List<HealthCheck>> getServiceChecks(java.lang.String service)
Retrieves the healthchecks for a service. GET /v1/health/checks/{service}

Returns:
A ConsulResponse containing a list of HealthCheck objects.

getServiceChecks

public ConsulResponse<java.util.List<HealthCheck>> getServiceChecks(java.lang.String service,
                                                                    CatalogOptions catalogOptions)
Retrieves the healthchecks for a service in a given datacenter. GET /v1/health/checks/{service}?dc={datacenter}

Parameters:
catalogOptions - The catalog specific options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getServiceChecks

public ConsulResponse<java.util.List<HealthCheck>> getServiceChecks(java.lang.String service,
                                                                    QueryOptions queryOptions)
Retrieves the healthchecks for a service with QueryOptions. GET /v1/health/checks/{service}

Parameters:
queryOptions - The Query Options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getServiceChecks

public ConsulResponse<java.util.List<HealthCheck>> getServiceChecks(java.lang.String service,
                                                                    CatalogOptions catalogOptions,
                                                                    QueryOptions queryOptions)
Retrieves the healthchecks for a service in a given datacenter with QueryOptions. GET /v1/health/checks/{service}?dc={datacenter}

Parameters:
catalogOptions - The catalog specific options to use.
queryOptions - The Query Options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getServiceChecks

public void getServiceChecks(java.lang.String service,
                             QueryOptions queryOptions,
                             ConsulResponseCallback<java.util.List<HealthCheck>> callback)
Asynchronously retrieves the healthchecks for a service in a given datacenter with QueryOptions. GET /v1/health/checks/{service}?dc={datacenter}

Parameters:
service - The service to query.
queryOptions - The Query Options to use.
callback - Callback implemented by callee to handle results.

getServiceChecks

public void getServiceChecks(java.lang.String service,
                             CatalogOptions catalogOptions,
                             QueryOptions queryOptions,
                             ConsulResponseCallback<java.util.List<HealthCheck>> callback)
Asynchronously retrieves the healthchecks for a service in a given datacenter with QueryOptions. GET /v1/health/checks/{service}?dc={datacenter}

Parameters:
service - The service to query.
catalogOptions - The catalog specific options to use.
queryOptions - The Query Options to use.
callback - Callback implemented by callee to handle results.

getChecksByState

public ConsulResponse<java.util.List<HealthCheck>> getChecksByState(State state)
Retrieves the healthchecks for a state. GET /v1/health/state/{state}

Parameters:
state - The state to query.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getChecksByState

public ConsulResponse<java.util.List<HealthCheck>> getChecksByState(State state,
                                                                    CatalogOptions catalogOptions)
Retrieves the healthchecks for a state in a given datacenter. GET /v1/health/state/{state}?dc={datacenter}

Parameters:
state - The state to query.
catalogOptions - The catalog specific options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getChecksByState

public ConsulResponse<java.util.List<HealthCheck>> getChecksByState(State state,
                                                                    QueryOptions queryOptions)
Retrieves the healthchecks for a state with QueryOptions. GET /v1/health/state/{state}

Parameters:
state - The state to query.
queryOptions - The Query Options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getChecksByState

public ConsulResponse<java.util.List<HealthCheck>> getChecksByState(State state,
                                                                    CatalogOptions catalogOptions,
                                                                    QueryOptions queryOptions)
Retrieves the healthchecks for a state in a given datacenter with QueryOptions. GET /v1/health/state/{state}?dc={datacenter}

Parameters:
state - The state to query.
catalogOptions - The catalog specific options to use.
queryOptions - The Query Options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getHealthyServiceInstances

public ConsulResponse<java.util.List<ServiceHealth>> getHealthyServiceInstances(java.lang.String service)
Retrieves the healthchecks for all healthy service instances. GET /v1/health/service/{service}?passing

Parameters:
service - The service to query.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getHealthyServiceInstances

public ConsulResponse<java.util.List<ServiceHealth>> getHealthyServiceInstances(java.lang.String service,
                                                                                CatalogOptions catalogOptions)
Retrieves the healthchecks for all healthy service instances in a given datacenter. GET /v1/health/service/{service}?dc={datacenter}&passing

Parameters:
service - The service to query.
catalogOptions - The catalog specific options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getHealthyServiceInstances

public ConsulResponse<java.util.List<ServiceHealth>> getHealthyServiceInstances(java.lang.String service,
                                                                                QueryOptions queryOptions)
Retrieves the healthchecks for all healthy service instances with QueryOptions. GET /v1/health/service/{service}?passing

Parameters:
service - The service to query.
queryOptions - The Query Options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getHealthyServiceInstances

public ConsulResponse<java.util.List<ServiceHealth>> getHealthyServiceInstances(java.lang.String service,
                                                                                CatalogOptions catalogOptions,
                                                                                QueryOptions queryOptions)
Retrieves the healthchecks for all healthy service instances in a given datacenter with QueryOptions. GET /v1/health/service/{service}?dc={datacenter}&passing

Parameters:
service - The service to query.
catalogOptions - The catalog specific options to use.
queryOptions - The Query Options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getHealthyServiceInstances

public void getHealthyServiceInstances(java.lang.String service,
                                       CatalogOptions catalogOptions,
                                       QueryOptions queryOptions,
                                       ConsulResponseCallback<java.util.List<ServiceHealth>> callback)
Asynchronously retrieves the healthchecks for all healthy service instances in a given datacenter with QueryOptions. GET /v1/health/service/{service}?dc={datacenter}&passing Experimental.

Parameters:
service - The service to query.
catalogOptions - The catalog specific options to use.
queryOptions - The Query Options to use.
callback - Callback implemented by callee to handle results.

getHealthyServiceInstances

public void getHealthyServiceInstances(java.lang.String service,
                                       QueryOptions queryOptions,
                                       ConsulResponseCallback<java.util.List<ServiceHealth>> callback)
Asynchronously retrieves the healthchecks for all healthy service instances in a given datacenter with QueryOptions. GET /v1/health/service/{service}?dc={datacenter}&passing Experimental.

Parameters:
service - The service to query.
queryOptions - The Query Options to use.
callback - Callback implemented by callee to handle results.

getAllServiceInstances

public ConsulResponse<java.util.List<ServiceHealth>> getAllServiceInstances(java.lang.String service)
Retrieves the healthchecks for all nodes. GET /v1/health/service/{service}

Parameters:
service - The service to query.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getAllServiceInstances

public ConsulResponse<java.util.List<ServiceHealth>> getAllServiceInstances(java.lang.String service,
                                                                            CatalogOptions catalogOptions)
Retrieves the healthchecks for all nodes in a given datacenter. GET /v1/health/service/{service}?dc={datacenter}

Parameters:
service - The service to query.
catalogOptions - The catalog specific options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getAllServiceInstances

public ConsulResponse<java.util.List<ServiceHealth>> getAllServiceInstances(java.lang.String service,
                                                                            QueryOptions queryOptions)
Retrieves the healthchecks for all nodes with QueryOptions. GET /v1/health/service/{service}

Parameters:
service - The service to query.
queryOptions - The Query Options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getAllServiceInstances

public ConsulResponse<java.util.List<ServiceHealth>> getAllServiceInstances(java.lang.String service,
                                                                            CatalogOptions catalogOptions,
                                                                            QueryOptions queryOptions)
Retrieves the healthchecks for all nodes in a given datacenter with QueryOptions. GET /v1/health/service/{service}?dc={datacenter}

Parameters:
service - The service to query.
catalogOptions - The catalog specific options to use.
queryOptions - The Query Options to use.
Returns:
A ConsulResponse containing a list of HealthCheck objects.

getAllServiceInstances

public void getAllServiceInstances(java.lang.String service,
                                   CatalogOptions catalogOptions,
                                   QueryOptions queryOptions,
                                   ConsulResponseCallback<java.util.List<ServiceHealth>> callback)
Asynchronously retrieves the healthchecks for all nodes in a given datacenter with QueryOptions. GET /v1/health/service/{service}?dc={datacenter} Experimental.

Parameters:
service - The service to query.
catalogOptions - The catalog specific options to use.
queryOptions - The Query Options to use.
callback - Callback implemented by callee to handle results.

getAllServiceInstances

public void getAllServiceInstances(java.lang.String service,
                                   QueryOptions queryOptions,
                                   ConsulResponseCallback<java.util.List<ServiceHealth>> callback)
Asynchronously retrieves the healthchecks for all nodes in a given datacenter with QueryOptions. GET /v1/health/service/{service}?dc={datacenter} Experimental.

Parameters:
service - The service to query.
queryOptions - The Query Options to use.
callback - Callback implemented by callee to handle results.