com.breuninger.boot.jobs.status.JobStatusDetailIndicator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-boot-starter-breuninger-jobs Show documentation
Show all versions of spring-boot-starter-breuninger-jobs Show documentation
spring-boot-starter-breuninger-jobs
package com.breuninger.boot.jobs.status;
import static java.util.Collections.singletonList;
import java.util.List;
import com.breuninger.boot.jobs.definition.JobDefinition;
import com.breuninger.boot.status.domain.StatusDetail;
import com.breuninger.boot.status.indicator.StatusDetailIndicator;
public class JobStatusDetailIndicator implements StatusDetailIndicator {
private final JobStatusCalculator jobStatusCalculator;
private final JobDefinition jobDefinition;
public JobStatusDetailIndicator(final JobDefinition jobDefinition, final JobStatusCalculator jobStatusCalculator) {
this.jobDefinition = jobDefinition;
this.jobStatusCalculator = jobStatusCalculator;
}
@Override
public List statusDetails() {
return singletonList(jobStatusCalculator.statusDetail(jobDefinition));
}
}