1 package oic.simulator.serviceprovider;
3 import oic.simulator.serviceprovider.manager.LogManager;
4 import oic.simulator.serviceprovider.manager.ResourceManager;
6 import org.eclipse.ui.plugin.AbstractUIPlugin;
7 import org.osgi.framework.BundleContext;
10 * The activator class controls the plug-in life cycle
12 public class Activator extends AbstractUIPlugin {
15 public static final String PLUGIN_ID = "ServiceProviderPlugin"; //$NON-NLS-1$
17 // The shared instance
18 private static Activator plugin;
20 private static ResourceManager resourceManager;
22 private static LogManager logManager;
27 public void start(BundleContext context) throws Exception {
30 setResourceManager(new ResourceManager());
31 setLogManager(new LogManager());
34 public void stop(BundleContext context) throws Exception {
37 // Stopping Resource Manager
38 if (null != resourceManager) {
39 resourceManager.shutdown();
40 resourceManager = null;
42 // Stopping Log Manager
43 if (null != logManager) {
44 logManager.shutdown();
50 public static Activator getDefault() {
54 public ResourceManager getResourceManager() {
55 return resourceManager;
58 private static void setResourceManager(ResourceManager manager) {
59 Activator.resourceManager = manager;
62 public LogManager getLogManager() {
66 private static void setLogManager(LogManager logManager) {
67 Activator.logManager = logManager;