integraal.services.AbstractInteGraalService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brunner-integraal Show documentation
Show all versions of brunner-integraal Show documentation
InteGraal module for the BRunner project
package integraal.services;
import fr.boreal.component_builder.ComponentBuilder;
import fr.boreal.component_builder.api.IAlgorithmParameters;
import fr.boreal.component_builder.api.IComponentBuilder;
import fr.boreal.component_builder.api.IInputDataScenario;
import tools.service.AbstractService;
/**
*
*/
public abstract class AbstractInteGraalService extends AbstractService {
protected ComponentBuilder builder;
/**
* @param ids input data scenario
* @param iap algorithm parameters
*/
public AbstractInteGraalService(IInputDataScenario ids, IAlgorithmParameters iap) {
super(ids, iap);
this.builder = IComponentBuilder.createDefaultBuilderFrom(ids, iap, false);
}
/**
* default implementation
*/
protected void close() {
/**
* Close all objects created by the component builder.
*/
builder.close();
}
/**
* @return timeout value or null
*
*/
public Integer getTimeout() {
return inputAlgorithmParameters.getTimeout().isPresent() ? inputAlgorithmParameters.getTimeout().get() : null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy