1 /* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
2 package org.opendaylight.openflowjava.protocol.impl.connection;
4 import java.util.Hashtable;
6 import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
7 import org.osgi.framework.BundleActivator;
8 import org.osgi.framework.BundleContext;
9 import org.slf4j.Logger;
10 import org.slf4j.LoggerFactory;
14 * Activate library bundle, expose provided implementations:
16 * <li>{@link SwitchConnectionProviderImpl}</li>
21 public class Activator implements BundleActivator {
23 private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
26 public void start(BundleContext context) throws Exception {
27 LOG.debug("starting OF Library");
28 Hashtable<String, String> props = new Hashtable<>();
29 props.put("type", "default");
30 context.registerService(
31 SwitchConnectionProvider.class.getName(),
32 new SwitchConnectionProviderImpl(), props);
36 public void stop(BundleContext context) throws Exception {
37 LOG.debug("stopping OF Library");
38 //TODO:: add teardown activities (check, if servers are running, stop if necessary..)