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

com.epam.reportportal.jobs.BaseJob Maven / Gradle / Ivy

There is a newer version: 5.13.0
Show newest version
package com.epam.reportportal.jobs;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;

public abstract class BaseJob {
    protected JdbcTemplate jdbcTemplate;
    protected final Logger LOGGER = LoggerFactory.getLogger(this.getClass());

    public BaseJob(JdbcTemplate jdbcTemplate) {
        this.jdbcTemplate = jdbcTemplate;
    }

    protected void logStart() {
        LOGGER.info("Job {} has been started.", this.getClass().getSimpleName());
    }

    protected void logFinish(Object result) {
        LOGGER.info("Job {} has been finished. Result {}", this.getClass().getSimpleName(), result);
    }

    protected void logFinish() {
        logFinish(null);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy