Activator.java 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package uraxis;
  2. import com.ur.urcap.api.contribution.toolbar.swing.SwingToolbarService;
  3. import org.osgi.framework.BundleActivator;
  4. import org.osgi.framework.BundleContext;
  5. import com.ur.urcap.api.contribution.InstallationNodeService;
  6. import com.ur.urcap.api.contribution.ProgramNodeService;
  7. import com.ur.urcap.api.contribution.DaemonService;
  8. import uraxis.toolbar.MyToolbarService;
  9. /**
  10. * Hello world activator for the OSGi bundle URCAPS contribution
  11. *
  12. */
  13. public class Activator implements BundleActivator {
  14. public static MyDaemonInterface daemonInterface;
  15. @Override
  16. public void start(BundleContext context) throws Exception {
  17. System.out.println("Activator says Hello World!");
  18. MyDaemonDaemonService daemonService = new MyDaemonDaemonService();
  19. MyDaemonInstallationNodeService installationNodeService = new MyDaemonInstallationNodeService(daemonService);
  20. context.registerService(InstallationNodeService.class, installationNodeService, null);
  21. context.registerService(ProgramNodeService.class, new MyDaemonProgramNodeService(), null);
  22. context.registerService(DaemonService.class, daemonService, null);
  23. context.registerService(SwingToolbarService.class, new MyToolbarService(), null);
  24. }
  25. @Override
  26. public void stop(BundleContext bundleContext) throws Exception {
  27. System.out.println("Activator says Goodbye World!");
  28. }
  29. }