// Path: AutoSIM-AMQP/src/com/automatski/autosim/amqp/config/AutoSIMAMQPConfig.java
// public class AutoSIMAMQPConfig {
// 
// 	public List<AutoSIMConnectionConfig> connections = new ArrayList<AutoSIMConnectionConfig>();
// 	
// }
// 
// Path: AutoSIM-AMQP/src/com/automatski/autosim/amqp/config/AutoSIMConnectionConfig.java
// public class AutoSIMConnectionConfig {
// 
// 	public String name;
// 	public String url;
// 	public String username;
// 	public String password;
// 	
// 	public String connectorClassName;
// }
// 
// Path: AutoSIM-AMQP/src/com/automatski/autosim/amqp/utils/GsonUtils.java
// public class GsonUtils {
// 
// 	private static GsonBuilder builder = null;
// 	
// 	static {
//         builder = new GsonBuilder();
//         builder.setPrettyPrinting().serializeNulls();
// 	}
// 	
// 	public static String objectToJson(Object obj) throws Exception {
//         Gson gson = builder.create();
//         return gson.toJson(obj);
// 	}
// 	
// 	public static Object jsonToObject(String path, Class clas) throws Exception {
//         Gson gson = builder.create();
// 		String json = new String(Files.readAllBytes(Paths.get(path)));//"./albums.json")));
//         return gson.fromJson(json, clas);
// 	}
// 	
// 	
// }
// 
// Path: AutoSIM-Environments/src/com/automatski/autosim/environments/IEnvironments.java
// public interface IEnvironments {
// 
// 	public void setup(String environment) throws Exception;
// 	public void start(String environment) throws Exception;
// 	public void stop(String environment) throws Exception;
// 	public void teardown(String environment) throws Exception;
// 	
// 	
// 	public void registerConnectionFactory(String name, IConnectionFactory factory); 
// 	public void deregisterConnectionFactory(String name);
// 	public IConnection getConnection(String name) throws Exception;
// 	
// 	public void registerDeviceFactory(String name, IDeviceFactory factory); 
// 	public void deregisterDeviceFactory(String name);
// 	public IDevice getDevice(String name) throws Exception;
// 	
// 	
// 	
// }


import java.util.HashMap;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import com.automatski.autosim.amqp.config.AutoSIMAMQPConfig;
import com.automatski.autosim.amqp.config.AutoSIMConnectionConfig;
import com.automatski.autosim.amqp.utils.GsonUtils;
import com.automatski.autosim.environments.IEnvironments;
/*
 *  AutoSIM - Internet of Things Simulator
 *  Copyright (C) 2014, Aditya Yadav <aditya@automatski.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU 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 General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.automatski.autosim.amqp;






/**
 * This class implements a simple bundle that uses the bundle
 * context to register an English language dictionary service
 * with the OSGi framework. The dictionary service interface is
 * defined in a separate class file and is implemented by an
 * inner class.
**/



public class AMQPServiceActivator implements BundleActivator
{
// Path: AutoSIM-AMQP/src/com/automatski/autosim/amqp/config/AutoSIMAMQPConfig.java
// public class AutoSIMAMQPConfig {
// 
// 	public List<AutoSIMConnectionConfig> connections = new ArrayList<AutoSIMConnectionConfig>();
// 	
// }
// 
// Path: AutoSIM-AMQP/src/com/automatski/autosim/amqp/config/AutoSIMConnectionConfig.java
// public class AutoSIMConnectionConfig {
// 
// 	public String name;
// 	public String url;
// 	public String username;
// 	public String password;
// 	
// 	public String connectorClassName;
// }
// 
// Path: AutoSIM-AMQP/src/com/automatski/autosim/amqp/utils/GsonUtils.java
// public class GsonUtils {
// 
// 	private static GsonBuilder builder = null;
// 	
// 	static {
//         builder = new GsonBuilder();
//         builder.setPrettyPrinting().serializeNulls();
// 	}
// 	
// 	public static String objectToJson(Object obj) throws Exception {
//         Gson gson = builder.create();
//         return gson.toJson(obj);
// 	}
// 	
// 	public static Object jsonToObject(String path, Class clas) throws Exception {
//         Gson gson = builder.create();
// 		String json = new String(Files.readAllBytes(Paths.get(path)));//"./albums.json")));
//         return gson.fromJson(json, clas);
// 	}
// 	
// 	
// }
// 
// Path: AutoSIM-Environments/src/com/automatski/autosim/environments/IEnvironments.java
// public interface IEnvironments {
// 
// 	public void setup(String environment) throws Exception;
// 	public void start(String environment) throws Exception;
// 	public void stop(String environment) throws Exception;
// 	public void teardown(String environment) throws Exception;
// 	
// 	
// 	public void registerConnectionFactory(String name, IConnectionFactory factory); 
// 	public void deregisterConnectionFactory(String name);
// 	public IConnection getConnection(String name) throws Exception;
// 	
// 	public void registerDeviceFactory(String name, IDeviceFactory factory); 
// 	public void deregisterDeviceFactory(String name);
// 	public IDevice getDevice(String name) throws Exception;
// 	
// 	
// 	
// }


// Path: AutoSIM-AMQP/src/com/automatski/autosim/amqp/AMQPServiceActivator.java
import java.util.HashMap;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import com.automatski.autosim.amqp.config.AutoSIMAMQPConfig;
import com.automatski.autosim.amqp.config.AutoSIMConnectionConfig;
import com.automatski.autosim.amqp.utils.GsonUtils;
import com.automatski.autosim.environments.IEnvironments;

/*
 *  AutoSIM - Internet of Things Simulator
 *  Copyright (C) 2014, Aditya Yadav <aditya@automatski.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU 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 General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.automatski.autosim.amqp;






/**
 * This class implements a simple bundle that uses the bundle
 * context to register an English language dictionary service
 * with the OSGi framework. The dictionary service interface is
 * defined in a separate class file and is implemented by an
 * inner class.
**/



public class AMQPServiceActivator implements BundleActivator
{
	private IEnvironments environments = null;