@ GET @ Path ( "/health" ) @ Produces ( MediaType . APPLICATION_JSON ) public HealthStatus health ( ) throws ExecutionException , InterruptedException { final HealthStatus status = new HealthStatus ( ) ; final Future < HealthDetails > dbStatus = healthDBService . dbStatus ( ) ; final Future < List < HealthDetails > > networkStatus = healthNetworkService . networkStatus ( ) ; status . add ( dbStatus . get ( ) ) ; networkStatus . get ( ) . forEach ( status :: add ) ; return status ; }
Get health status