2 * Copyright (C) 2013 Red Hat, Inc.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 * Authors : Madhu Venugopal, Brent Salisbury
10 package org.opendaylight.ovsdb.lib;
12 import org.apache.felix.dm.DependencyActivatorBase;
13 import org.apache.felix.dm.DependencyManager;
14 import org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService;
15 import org.osgi.framework.BundleContext;
16 import org.slf4j.Logger;
17 import org.slf4j.LoggerFactory;
20 * OVSDB Library OSGi Activator
22 public class Activator extends DependencyActivatorBase {
23 protected static final Logger logger = LoggerFactory
24 .getLogger(Activator.class);
27 public void init(BundleContext context, DependencyManager manager) throws Exception {
28 manager.add(createComponent()
29 .setInterface(OvsdbConnection.class.getName(), null)
30 .setImplementation(OvsdbConnectionService.class)
32 manager.createServiceDependency()
33 .setService(OvsdbConnectionListener.class)
34 .setCallbacks("registerForPassiveConnection", "unregisterFromPassiveConnection")
39 public void destroy(BundleContext context, DependencyManager manager) throws Exception {}