X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.rest%2Fsrc%2Forg%2Fsimantics%2Fscl%2Frest%2FActivator.java;fp=bundles%2Forg.simantics.scl.rest%2Fsrc%2Forg%2Fsimantics%2Fscl%2Frest%2FActivator.java;h=4f90e690089c91094484602f303ec1eb809eefaf;hb=db00b51c6ab9c63883de134e669b5da5be0f1bd5;hp=0000000000000000000000000000000000000000;hpb=23fa194c0cf85db6c435f342600d30ddc0f8c620;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.rest/src/org/simantics/scl/rest/Activator.java b/bundles/org.simantics.scl.rest/src/org/simantics/scl/rest/Activator.java new file mode 100644 index 000000000..4f90e6900 --- /dev/null +++ b/bundles/org.simantics.scl.rest/src/org/simantics/scl/rest/Activator.java @@ -0,0 +1,35 @@ +package org.simantics.scl.rest; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * + * @see + * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * + * @see + * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + SCLRESTServer.stop(); + Activator.context = null; + } + +}