io.deepsense.neptune.clientlibrary.models.impl.job.JobBuilderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neptune-client-library Show documentation
Show all versions of neptune-client-library Show documentation
Enables integration with Neptune in your Java code
/**
* Copyright (c) 2016, CodiLime Inc.
*/
package io.deepsense.neptune.clientlibrary.models.impl.job;
import com.google.common.base.Preconditions;
import io.deepsense.neptune.clientlibrary.services.apimodelconverter.ApiModelConverter;
import io.deepsense.neptune.clientlibrary.services.apiservice.ApiService;
import io.deepsense.neptune.clientlibrary.services.serverconfigurationprovider.ServerConfigurationProvider;
public class JobBuilderFactory {
private final ApiService apiService;
private final ApiModelConverter apiModelConverter;
private final ServerConfigurationProvider serverConfigurationProvider;
private final io.deepsense.neptune.apiclient.model.Job apiJobModel;
public JobBuilderFactory(
ApiService apiService,
ApiModelConverter apiModelConverter,
ServerConfigurationProvider serverConfigurationProvider,
io.deepsense.neptune.apiclient.model.Job apiJobModel) {
this.apiService = Preconditions.checkNotNull(apiService);
this.apiModelConverter = Preconditions.checkNotNull(apiModelConverter);
this.serverConfigurationProvider = Preconditions.checkNotNull(serverConfigurationProvider);
this.apiJobModel = Preconditions.checkNotNull(apiJobModel);
}
public JobBuilder create() {
return apiModelConverter.jobBuilderFromApiModel(apiJobModel)
.withApiService(apiService)
.withApiModelConverter(apiModelConverter)
.withMaxChannelValueSize(serverConfigurationProvider.getMaxChannelValueSize());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy