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

integraal.services.AbstractInteGraalService Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
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