]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.detached/src/main/java/org/argeo/slc/detached/Activator.java
Start introducing OSGi commands
[gpl/argeo-slc.git] / org.argeo.slc.detached / src / main / java / org / argeo / slc / detached / Activator.java
1 package org.argeo.slc.detached;
2
3 import java.util.Properties;
4
5 import org.osgi.framework.BundleContext;
6
7 public class Activator extends AbstractDetachedActivator {
8 private DetachedExecutionServerImpl executionServer;
9
10 protected void startAutoBundle(BundleContext context) throws Exception {
11 Object obj = getStaticRefProvider().getStaticRef("executionServer");
12 if (obj != null)
13 executionServer = (DetachedExecutionServerImpl) obj;
14 else
15 throw new DetachedException("Could not find execution server.");
16
17 executionServer.init(context);
18
19 context.registerService(DetachedExecutionServer.class.getName(),
20 executionServer, new Properties());
21 }
22
23 protected void stopAutoBundle(BundleContext context) throws Exception {
24 // TODO Auto-generated method stub
25 super.stopAutoBundle(context);
26 }
27
28 }