12345678910111213141516171819202122232425262728293031 |
- package uraxis.impl;
- import org.osgi.framework.BundleActivator;
- import org.osgi.framework.BundleContext;
- import com.ur.urcap.api.contribution.InstallationNodeService;
- import com.ur.urcap.api.contribution.ProgramNodeService;
- import com.ur.urcap.api.contribution.DaemonService;
- /**
- * Hello world activator for the OSGi bundle URCAPS contribution
- *
- */
- public class Activator implements BundleActivator {
- @Override
- public void start(BundleContext context) throws Exception {
- System.out.println("Activator says Hello World!");
- MyDaemonDaemonService daemonService = new MyDaemonDaemonService();
- MyDaemonInstallationNodeService installationNodeService = new MyDaemonInstallationNodeService(daemonService);
- context.registerService(InstallationNodeService.class, installationNodeService, null);
- context.registerService(ProgramNodeService.class, new MyDaemonProgramNodeService(), null);
- context.registerService(DaemonService.class, daemonService, null);
- }
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- System.out.println("Activator says Goodbye World!");
- }
- }
|