X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fstub%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugins%2Fstub%2Finternal%2FActivator.java;h=843e60ec36fba1218b0aa61eac75a019d5e96067;hb=94d0d20b41d64bb6696c2a573ec367fcfddc44e9;hp=79edd93c67466a6da6820fe654dd0aeea95ac656;hpb=68ef34f0d8f426ce525ccefb4e5a36162f2eb717;p=controller.git diff --git a/opendaylight/protocol_plugins/stub/src/main/java/org/opendaylight/controller/protocol_plugins/stub/internal/Activator.java b/opendaylight/protocol_plugins/stub/src/main/java/org/opendaylight/controller/protocol_plugins/stub/internal/Activator.java index 79edd93c67..843e60ec36 100644 --- a/opendaylight/protocol_plugins/stub/src/main/java/org/opendaylight/controller/protocol_plugins/stub/internal/Activator.java +++ b/opendaylight/protocol_plugins/stub/src/main/java/org/opendaylight/controller/protocol_plugins/stub/internal/Activator.java @@ -1,31 +1,35 @@ -package org.opendaylight.controller.protocol_plugins.stub.internal; +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + -import java.util.Dictionary; -import java.util.Hashtable; -import org.apache.felix.dm.Component; +package org.opendaylight.controller.protocol_plugins.stub.internal; + +import org.apache.felix.dm.Component; import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase; -import org.opendaylight.controller.sal.core.IContainerListener; -import org.opendaylight.controller.sal.utils.INodeConnectorFactory; -import org.opendaylight.controller.sal.utils.INodeFactory; import org.opendaylight.controller.sal.core.Node; import org.opendaylight.controller.sal.core.NodeConnector; -import org.opendaylight.controller.sal.discovery.IDiscoveryService; import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService; import org.opendaylight.controller.sal.inventory.IPluginInInventoryService; import org.opendaylight.controller.sal.inventory.IPluginOutInventoryService; -import org.opendaylight.controller.sal.packet.IPluginInDataPacketService; -import org.opendaylight.controller.sal.packet.IPluginOutDataPacketService; import org.opendaylight.controller.sal.reader.IPluginInReadService; -import org.opendaylight.controller.sal.reader.IReadService; import org.opendaylight.controller.sal.topology.IPluginInTopologyService; import org.opendaylight.controller.sal.topology.IPluginOutTopologyService; import org.opendaylight.controller.sal.utils.GlobalConstants; - +import org.opendaylight.controller.sal.utils.INodeConnectorFactory; +import org.opendaylight.controller.sal.utils.INodeFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Dictionary; +import java.util.Hashtable; + /** * stub protocol plugin Activator * @@ -68,7 +72,7 @@ public class Activator extends ComponentActivatorAbstractBase { */ @Override public Object[] getImplementations() { - Object[] res = { ReadService.class, InventoryService.class }; + Object[] res = { ReadService.class, InventoryService.class, TopologyServices.class }; return res; } @@ -106,6 +110,17 @@ public class Activator extends ComponentActivatorAbstractBase { props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), "STUB"); c.setInterface(IPluginInInventoryService.class.getName(), props); } + + if(imp.equals(TopologyServices.class)){ + Dictionary props = new Hashtable(); + props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), "STUB"); + c.setInterface(IPluginInTopologyService.class.getName(), props); + c.add(createServiceDependency().setService(IPluginOutTopologyService.class, "") + .setCallbacks("setPluginOutTopologyService", "unsetPluginOutTopologyService") + .setRequired(true)); + + } + } @Override @@ -115,7 +130,8 @@ public class Activator extends ComponentActivatorAbstractBase { FlowProgrammerService.class, StubNodeFactory.class, StubNodeConnectorFactory.class, - InventoryService.class }; + InventoryService.class + }; return res; } @@ -159,5 +175,6 @@ public class Activator extends ComponentActivatorAbstractBase { .setCallbacks("setPluginOutInventoryServices", "unsetPluginOutInventoryServices") .setRequired(true)); } + } }