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

com.github.dikhan.ApiServiceFactory Maven / Gradle / Ivy

There is a newer version: 3.1.2
Show newest version
package com.github.dikhan;

/**
 * This class is in charge of producing implementations of ApiService. The default impl can be retrieved
 * by calling {@link ApiServiceFactory#getDefault()} method. In the case where a new impl is preferred, that
 * would be the method to update making the factory return the new implementation configured instead.
 */
public class ApiServiceFactory {

    private final String eventApi;

    public ApiServiceFactory(String eventApi) {
        this.eventApi = eventApi;
    }

    public ApiService getDefault() {
        return new HttpApiServiceImpl(eventApi);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy