// Path: src/main/java/org/centralperf/sampler/api/Sampler.java
// public interface Sampler {
// 	/**
// 	 * Human readable of the sampler 
// 	 * @return The name for this sampler
// 	 */
// 	public String getName();
// 	
// 	/**
// 	 * Arbitratry unique ID for this sampler. Will never be displayed, but we be used to identify the kind of sampler used for a run 
// 	 * @return The UID of this sampler
// 	 */
// 	public String getUID();
// 	
// 	/**
// 	 * Launcher for this sample
// 	 * @return The launched of this sampler
// 	 */
// 	public SamplerLauncher getLauncher();
// 	
// 	/**
// 	 * The script processor analyze script to extract variables and is used to inject custom variables values in a definitive script
// 	 * before being launched
// 	 * @return The script processor for this sampler
// 	 */
// 	public SamplerScriptProcessor getScriptProcessor();
// 	
// 	/**
// 	 * Get the file extension for a script. This allows to build a complete filename when downloading the script
// 	 * @return the script file common extension (".jmx" for example)
// 	 */
// 	public String getScriptFileExtension();
// }
// 
// Path: src/main/java/org/centralperf/sampler/driver/gatling/GatlingSampler.java
// @Deprecated
// public class GatlingSampler implements Sampler {
// 
// 	@Resource
// 	private GatlingLauncher launcher;
// 	
// 	@Resource
// 	private GatlingScriptProcessor scriptProcessor;
// 	
// 	public static final String UID = "GATLING_1_X";
// 	
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	@Override
// 	public String getName() {
// 		return "Gatling 1.x";
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	@Override
// 	public String getUID() {
// 		return UID;
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	@Override
// 	public SamplerLauncher getLauncher() {
// 		return launcher;
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	@Override
// 	public SamplerScriptProcessor getScriptProcessor() {
// 		return scriptProcessor;
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	@Override
// 	public String getScriptFileExtension() {
// 		return ".scala";
// 	}
// 
// }
// 
// Path: src/main/java/org/centralperf/sampler/driver/jmeter/JMeterSampler.java
// @Component
// public class JMeterSampler implements Sampler {
// 
// 	@Resource
// 	private JMeterLauncher launcher;
// 	
// 	@Resource
// 	private JMeterScriptProcessor scriptProcessor;
// 	
// 	public static final String UID = "JMETER_LOCAL";
// 	
// 	/**
// 	 * {@inheritDoc}
// 	 */	
// 	@Override
// 	public String getName() {
// 		return "JMeter local";
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */	
// 	@Override
// 	public String getUID() {
// 		return UID;
// 	}
// 	
// 	/**
// 	 * {@inheritDoc}
// 	 */	
// 	@Override
// 	public SamplerLauncher getLauncher() {
// 		return launcher;
// 	}	
// 	
// 	/**
// 	 * {@inheritDoc}
// 	 */	
// 	@Override
// 	public SamplerScriptProcessor getScriptProcessor() {
// 		return scriptProcessor;
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */	
// 	@Override
// 	public String getScriptFileExtension() {
// 		return ".jmx";
// 	}	
// 
// }


import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Resource;
import org.centralperf.sampler.api.Sampler;
import org.centralperf.sampler.driver.gatling.GatlingSampler;
import org.centralperf.sampler.driver.jmeter.JMeterSampler;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;
/*
 * Copyright (C) 2014  The Central Perf authors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.centralperf.service;




/**
 * Manager available sampler types (JMeter, Gatling...) 
 * @since 1.0
 *
 */
@Service
public class SamplerService implements InitializingBean{
	
	private Map<String,Sampler> samplers;

	@Resource
// Path: src/main/java/org/centralperf/sampler/api/Sampler.java
// public interface Sampler {
// 	/**
// 	 * Human readable of the sampler 
// 	 * @return The name for this sampler
// 	 */
// 	public String getName();
// 	
// 	/**
// 	 * Arbitratry unique ID for this sampler. Will never be displayed, but we be used to identify the kind of sampler used for a run 
// 	 * @return The UID of this sampler
// 	 */
// 	public String getUID();
// 	
// 	/**
// 	 * Launcher for this sample
// 	 * @return The launched of this sampler
// 	 */
// 	public SamplerLauncher getLauncher();
// 	
// 	/**
// 	 * The script processor analyze script to extract variables and is used to inject custom variables values in a definitive script
// 	 * before being launched
// 	 * @return The script processor for this sampler
// 	 */
// 	public SamplerScriptProcessor getScriptProcessor();
// 	
// 	/**
// 	 * Get the file extension for a script. This allows to build a complete filename when downloading the script
// 	 * @return the script file common extension (".jmx" for example)
// 	 */
// 	public String getScriptFileExtension();
// }
// 
// Path: src/main/java/org/centralperf/sampler/driver/gatling/GatlingSampler.java
// @Deprecated
// public class GatlingSampler implements Sampler {
// 
// 	@Resource
// 	private GatlingLauncher launcher;
// 	
// 	@Resource
// 	private GatlingScriptProcessor scriptProcessor;
// 	
// 	public static final String UID = "GATLING_1_X";
// 	
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	@Override
// 	public String getName() {
// 		return "Gatling 1.x";
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	@Override
// 	public String getUID() {
// 		return UID;
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	@Override
// 	public SamplerLauncher getLauncher() {
// 		return launcher;
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	@Override
// 	public SamplerScriptProcessor getScriptProcessor() {
// 		return scriptProcessor;
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	@Override
// 	public String getScriptFileExtension() {
// 		return ".scala";
// 	}
// 
// }
// 
// Path: src/main/java/org/centralperf/sampler/driver/jmeter/JMeterSampler.java
// @Component
// public class JMeterSampler implements Sampler {
// 
// 	@Resource
// 	private JMeterLauncher launcher;
// 	
// 	@Resource
// 	private JMeterScriptProcessor scriptProcessor;
// 	
// 	public static final String UID = "JMETER_LOCAL";
// 	
// 	/**
// 	 * {@inheritDoc}
// 	 */	
// 	@Override
// 	public String getName() {
// 		return "JMeter local";
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */	
// 	@Override
// 	public String getUID() {
// 		return UID;
// 	}
// 	
// 	/**
// 	 * {@inheritDoc}
// 	 */	
// 	@Override
// 	public SamplerLauncher getLauncher() {
// 		return launcher;
// 	}	
// 	
// 	/**
// 	 * {@inheritDoc}
// 	 */	
// 	@Override
// 	public SamplerScriptProcessor getScriptProcessor() {
// 		return scriptProcessor;
// 	}
// 
// 	/**
// 	 * {@inheritDoc}
// 	 */	
// 	@Override
// 	public String getScriptFileExtension() {
// 		return ".jmx";
// 	}	
// 
// }


// Path: src/main/java/org/centralperf/service/SamplerService.java
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Resource;
import org.centralperf.sampler.api.Sampler;
import org.centralperf.sampler.driver.gatling.GatlingSampler;
import org.centralperf.sampler.driver.jmeter.JMeterSampler;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;

/*
 * Copyright (C) 2014  The Central Perf authors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.centralperf.service;




/**
 * Manager available sampler types (JMeter, Gatling...) 
 * @since 1.0
 *
 */
@Service
public class SamplerService implements InitializingBean{
	
	private Map<String,Sampler> samplers;

	@Resource
	private JMeterSampler jMeterSampler;	