/** * Default constructor to create a new DiagnosisEngine instance. * * @param configuration * The {@link DiagnosisEngineConfiguration} to be used. Must not be null. * @throws DiagnosisEngineException * If the provided configuration is not valid. */ public DiagnosisEngine(DiagnosisEngineConfiguration<I, R> configuration) throws DiagnosisEngineException { this.configuration = checkNotNull(configuration, "The configuration must not be null."); this.configuration.validate(); this.sessionPool = new SessionPool<>(configuration); // Wrap in listing executor this.sessionExecutor = MoreExecutors.listeningDecorator(configuration.getExecutorService()); }