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

org.cohesive.envoy.event.MonitorEventEmitterFactory Maven / Gradle / Ivy

There is a newer version: 0.0.5
Show newest version
package org.cohesive.envoy.event;

/**
 * Factory class that provides an event emitter
 * implementation based on the event service 
 * type (e.g. DataDog, Logz.io, and others).
 * 
 * @author dharrington
 * 
 */
public class MonitorEventEmitterFactory {
	
	public static final MonitorEventEmitter getEmitter() {
		switch (getType().toUpperCase()) {
			case "DATADOG" :
				return new DataDogMonitorEventEmitter();
			default:
				throw new IllegalArgumentException("Unknown Event Emitter type");
		}
	}
	
	private static String getType() {
		return System.getenv("ENV_EVENT_SVC_TYPE");
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy