]> git.argeo.org Git - gpl/argeo-slc.git/blob - Activator.java
b9ef442d272377fccf93fc942085c94e05e73b6a
[gpl/argeo-slc.git] / 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 }