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

com.scalar.dl.client.service.ClientServiceFactory Maven / Gradle / Ivy

There is a newer version: 3.10.0
Show newest version
package com.scalar.dl.client.service;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.scalar.dl.client.config.ClientConfig;

/** A factory class to instantiate {@link ClientService} */
public class ClientServiceFactory {
  private final Injector injector;

  public ClientServiceFactory(ClientConfig config) {
    injector = Guice.createInjector(new ClientModule(config));
  }

  /**
   * Returns a {@link ClientService} instance
   *
   * @return a {@link ClientService} instance
   */
  public ClientService getClientService() {
    return injector.getInstance(ClientService.class);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy