com.github.dikhan.ApiServiceFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pagerduty-client Show documentation
Show all versions of pagerduty-client Show documentation
Simple Java PagerDuty client with full integration with PagerDuty Events APIs
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