Health API
The Health Service is a component at the service layer of the BDK which covers the Health Service part of the REST API documentation. More precisely:
How to use
The central component for the Health Service is the HealthService
class, it exposes the service APIs endpoints mentioned above. The service is accessible from theSymphonyBdk
object by calling the health()
method:
@Slf4j
public class Example {
public static void main(String[] args) throws Exception {
// Create BDK entry point
final SymphonyBdk bdk = new SymphonyBdk(loadFromClasspath("/config.yaml"));
// Get health check extended status
HealthService health = bdk.health();
V3Health v3Health = health.healthCheckExtended();
log.info("Health status: " + v3Health.getStatus());
}
}
The service also provides the datafeed loop connectivity health status.
@Slf4j
public class Example {
public static void main(String[] args) throws Exception {
// Create BDK entry point
final SymphonyBdk bdk = new SymphonyBdk(loadFromClasspath("/config.yaml"));
// Get health check extended status
HealthService health = bdk.health();
V3HealthStatus v3HealthStatus = health.datafeedHealthCheck();
log.info("Health status: " + v3HealthStatus);
}
}