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

com.nitorcreations.nflow.engine.service.HealthCheckService Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
package com.nitorcreations.nflow.engine.service;

import javax.inject.Inject;

import org.springframework.stereotype.Component;

import com.nitorcreations.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