123456789101112131415161718192021222324252627 |
- package at.acdp.opcur.ur;
- import at.acdp.opcur.opc.Server;
- import com.ur.urcap.api.contribution.installation.swing.SwingInstallationNodeService;
- import com.ur.urcap.api.contribution.program.swing.SwingProgramNodeService;
- import org.osgi.framework.BundleActivator;
- import org.osgi.framework.BundleContext;
- public class Activator implements BundleActivator {
- @Override
- public void start(final BundleContext context) throws Exception {
- context.registerService(SwingInstallationNodeService.class, new HelloWorldInstallationNodeService(), null);
- context.registerService(SwingProgramNodeService.class, new HelloWorldProgramNodeService(), null);
- new Thread(() -> {
- try {
- Server.main(null);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }).start();
- }
- @Override
- public void stop(BundleContext context) throws Exception {
- }
- }
|