1 package org.opendaylight.controller.sal.networkconfig.internal;
3 import org.apache.felix.dm.Component;
4 import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
5 import org.opendaylight.controller.sal.networkconfig.bridgedomain.IBridgeDomainConfigService;
6 import org.opendaylight.controller.sal.networkconfig.bridgedomain.IPluginInBridgeDomainConfigService;
7 import org.opendaylight.controller.sal.networkconfig.bridgedomain.internal.BridgeDomainConfigService;
8 import org.slf4j.Logger;
9 import org.slf4j.LoggerFactory;
11 public class Activator extends ComponentActivatorAbstractBase {
12 protected static final Logger logger = LoggerFactory
13 .getLogger(Activator.class);
17 * Function that is used to communicate to dependency manager the list of
18 * known Global implementations
21 * @return An array containing all the CLASS objects that will be
22 * instantiated in order to get an fully working implementation
25 public Object[] getGlobalImplementations() {
26 Object[] res = { BridgeDomainConfigService.class};
31 * Function that is called when configuration of the dependencies is required.
34 * dependency manager Component object, used for configuring the
35 * dependencies exported and imported
37 * Implementation class that is being configured, needed as long
38 * as the same routine can configure multiple implementations
40 public void configureGlobalInstance(Component c, Object imp) {
41 if (imp.equals(BridgeDomainConfigService.class)) {
43 new String[] { IBridgeDomainConfigService.class.getName()},
46 c.add(createServiceDependency()
47 .setService(IPluginInBridgeDomainConfigService.class)
48 .setCallbacks("setPluginInService", "unsetPluginInService")