All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.nflow.engine.service.HealthCheckService Maven / Gradle / Ivy

There is a newer version: 10.0.0
Show newest version
package io.nflow.engine.service;

import javax.inject.Inject;

import org.springframework.stereotype.Component;

import io.nflow.engine.internal.dao.HealthCheckDao;

/**
 * Service for checking the database connection. The service can be e.g. hooked up to web service health check endpoint.
 */
@Component
public class HealthCheckService {

  private final HealthCheckDao healthCheckDao;

  @Inject
  public HealthCheckService(HealthCheckDao healthCheckDao) {
    this.healthCheckDao = healthCheckDao;
  }

  public boolean checkDatabaseConnection() {
    healthCheckDao.checkDatabaseConnection();
    return true;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy