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

io.deepsense.neptune.clientlibrary.models.impl.context.NeptuneContextBuilder Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
/**
 * Copyright (c) 2016, CodiLime Inc.
 */

package io.deepsense.neptune.clientlibrary.models.impl.context;

import io.deepsense.neptune.clientlibrary.models.NeptuneContext;
import io.deepsense.neptune.clientlibrary.models.impl.job.JobBuilder;
import io.deepsense.neptune.clientlibrary.models.impl.parameters.JobParametersFactory;
import io.deepsense.neptune.clientlibrary.services.apimodelconverter.ApiModelConverterFactory;
import io.deepsense.neptune.clientlibrary.services.apiservice.ApiServiceBuilder;
import io.deepsense.neptune.clientlibrary.threads.ChannelValueSendingThread;

import java.net.URI;

public class NeptuneContextBuilder {

    private ApiModelConverterFactory apiModelConverterFactory;

    private ApiServiceBuilder apiServiceBuilder;

    private ChannelValueSendingThread channelValueSendingThread;

    private JobBuilder jobBuilder;

    private JobParametersFactory jobParametersFactory;

    private URI dumpDirUrl;

    public NeptuneContext build() {
        return new NeptuneContextImpl(
                apiModelConverterFactory,
                apiServiceBuilder,
                channelValueSendingThread,
                jobBuilder,
                jobParametersFactory,
                dumpDirUrl);
    }

    public NeptuneContextBuilder withApiModelConverterFactory(ApiModelConverterFactory apiModelConverterFactory) {
        this.apiModelConverterFactory = apiModelConverterFactory;
        return this;
    }

    public NeptuneContextBuilder withApiServiceBuilder(ApiServiceBuilder apiServiceBuilder) {
        this.apiServiceBuilder = apiServiceBuilder;
        return this;
    }

    public NeptuneContextBuilder withChannelValueSendingThread(ChannelValueSendingThread channelValueSendingThread) {
        this.channelValueSendingThread = channelValueSendingThread;
        return this;
    }

    public NeptuneContextBuilder withJobBuilder(JobBuilder jobBuilder) {
        this.jobBuilder = jobBuilder;
        return this;
    }

    public NeptuneContextBuilder withJobParametersFactory(JobParametersFactory jobParametersFactory) {
        this.jobParametersFactory = jobParametersFactory;
        return this;
    }

    public NeptuneContextBuilder withDumpDirUrl(URI dumpDirUrl) {
        this.dumpDirUrl = dumpDirUrl;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy