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

com.breuninger.boot.jobs.status.JobStatusDetailIndicator Maven / Gradle / Ivy

There is a newer version: 2.0.5.RELEASE
Show newest version
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));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy