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);
16 * Function called when the activator starts just after some initializations
17 * are done by the ComponentActivatorAbstractBase.
26 * Function called when the activator stops just before the cleanup done by
27 * ComponentActivatorAbstractBase
31 public void destroy() {
36 * Function that is used to communicate to dependency manager the list of
37 * known Global implementations
40 * @return An array containing all the CLASS objects that will be
41 * instantiated in order to get an fully working implementation
44 public Object[] getGlobalImplementations() {
45 Object[] res = { BridgeDomainConfigService.class};
50 * Function that is called when configuration of the dependencies is required.
53 * dependency manager Component object, used for configuring the
54 * dependencies exported and imported
56 * Implementation class that is being configured, needed as long
57 * as the same routine can configure multiple implementations
59 public void configureGlobalInstance(Component c, Object imp) {
60 if (imp.equals(BridgeDomainConfigService.class)) {
62 new String[] { IBridgeDomainConfigService.class.getName()},
65 c.add(createServiceDependency()
66 .setService(IPluginInBridgeDomainConfigService.class)
67 .setCallbacks("setPluginInService", "unsetPluginInService")