X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Finternal%2FActivator.java;h=d92c57bd8a59d9852326e2f2238af9dac2784971;hp=ee62204f3fa233e4918ec3f3aaa3470e051755b3;hb=315a10ec8b79abec3f4d718359ebb4202bffcb11;hpb=5466b63d3ad41fadf0aa4d5bf69b77c32f5d6638 diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java index ee62204f3f..d92c57bd8a 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013-2014 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, @@ -58,22 +58,9 @@ public class Activator extends ComponentActivatorAbstractBase { .getLogger(Activator.class); /** - * Function called when the activator starts just after some initializations - * are done by the ComponentActivatorAbstractBase. - * + * Priority to determine whether to override existing protocol service. */ - @Override - public void init() { - } - - /** - * Function called when the activator stops just before the cleanup done by - * ComponentActivatorAbstractBase - * - */ - @Override - public void destroy() { - } + private static final int PLUGIN_PRIORITY = 10; /** * Function that is used to communicate to dependency manager the list of @@ -153,6 +140,8 @@ public class Activator extends ComponentActivatorAbstractBase { // Set the protocolPluginType property which will be used // by SAL props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), Node.NodeIDType.OPENFLOW); + props.put(GlobalConstants.PROTOCOLPLUGINPRIORITY.toString(), + Integer.valueOf(PLUGIN_PRIORITY)); c.setInterface(IPluginInDataPacketService.class.getName(), props); // Hook the services coming in from SAL, as optional in // case SAL is not yet there, could happen @@ -182,6 +171,8 @@ public class Activator extends ComponentActivatorAbstractBase { // Set the protocolPluginType property which will be used // by SAL props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), Node.NodeIDType.OPENFLOW); + props.put(GlobalConstants.PROTOCOLPLUGINPRIORITY.toString(), + Integer.valueOf(PLUGIN_PRIORITY)); c.setInterface(new String[] { IReadFilterInternalListener.class.getName(), IPluginInReadService.class.getName() }, props); @@ -273,6 +264,8 @@ public class Activator extends ComponentActivatorAbstractBase { // Set the protocolPluginType property which will be used // by SAL props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), Node.NodeIDType.OPENFLOW); + props.put(GlobalConstants.PROTOCOLPLUGINPRIORITY.toString(), + Integer.valueOf(PLUGIN_PRIORITY)); c.setInterface( new String[] { IPluginInFlowProgrammerService.class.getName(), IMessageListener.class.getName(), IContainerListener.class.getName(), IInventoryShimExternalListener.class.getName(), @@ -286,7 +279,7 @@ public class Activator extends ComponentActivatorAbstractBase { c.add(createServiceDependency() .setService(IFlowProgrammerNotifier.class) .setCallbacks("setFlowProgrammerNotifier", - "unsetsetFlowProgrammerNotifier") + "unsetFlowProgrammerNotifier") .setRequired(false)); c.add(createServiceDependency()