2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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 package org.opendaylight.controller.sal.networkconfig.internal;
10 import org.apache.felix.dm.Component;
11 import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
12 import org.opendaylight.controller.sal.networkconfig.bridgedomain.IBridgeDomainConfigService;
13 import org.opendaylight.controller.sal.networkconfig.bridgedomain.IPluginInBridgeDomainConfigService;
14 import org.opendaylight.controller.sal.networkconfig.bridgedomain.internal.BridgeDomainConfigService;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
18 public class Activator extends ComponentActivatorAbstractBase {
19 protected static final Logger logger = LoggerFactory
20 .getLogger(Activator.class);
24 * Function that is used to communicate to dependency manager the list of
25 * known Global implementations
28 * @return An array containing all the CLASS objects that will be
29 * instantiated in order to get an fully working implementation
32 public Object[] getGlobalImplementations() {
33 Object[] res = { BridgeDomainConfigService.class};
38 * Function that is called when configuration of the dependencies is required.
41 * dependency manager Component object, used for configuring the
42 * dependencies exported and imported
44 * Implementation class that is being configured, needed as long
45 * as the same routine can configure multiple implementations
47 public void configureGlobalInstance(Component c, Object imp) {
48 if (imp.equals(BridgeDomainConfigService.class)) {
50 new String[] { IBridgeDomainConfigService.class.getName()},
53 c.add(createServiceDependency()
54 .setService(IPluginInBridgeDomainConfigService.class)
55 .setCallbacks("setPluginInService", "unsetPluginInService")