de.mklinger.qetcher.client.impl.InstanceFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qetcher-client-bundle Show documentation
Show all versions of qetcher-client-bundle Show documentation
Qetcher Java client, OSGi bundle, minimal dependencies
package de.mklinger.qetcher.client.impl;
import de.mklinger.qetcher.client.InputConversionFile;
import de.mklinger.qetcher.client.InputJob;
import de.mklinger.qetcher.client.QetcherClient;
import de.mklinger.qetcher.client.impl.lookup.NodeLookupQetcherClientImpl;
import de.mklinger.qetcher.client.impl.lookup.StaticServiceUriSupplier;
import de.mklinger.qetcher.client.impl.retry.RetryingQetcherClientImpl;
/**
* @author Marc Klinger - mklinger[at]mklinger[dot]de
*/
public class InstanceFactory {
/** No instantiation. */
private InstanceFactory() {}
public static QetcherClient newInstance(final QetcherClientBuilderImpl builder) {
if (builder.isServiceLookupDisabled()) {
return new RetryingQetcherClientImpl(builder, new StaticServiceUriSupplier(builder.getServiceUris()));
} else {
return new NodeLookupQetcherClientImpl(builder);
}
}
public static InputConversionFile newInstance(final InputConversionFileBuilderImpl builder) {
return new InputConversionFileImpl(builder);
}
public static InputJob newInstance(final InputJobBuilderImpl builder) {
return new InputJobImpl(builder);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy