Merge "Bug 6374 topology-manager - DTCL instead of DTL"
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / OpenFlowPluginProvider.java
index 3368056332145ead91f940397ea35a495e334b15..31f1828a7d82e7ff771391ba645247abf4017130 100644 (file)
@@ -8,33 +8,74 @@
 
 package org.opendaylight.openflowplugin.api.openflow;
 
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.api.types.rev150327.OfpRole;
 import java.util.Collection;
+import java.util.Map;
+import org.opendaylight.controller.md.sal.binding.api.BindingService;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
+import org.opendaylight.controller.md.sal.binding.api.NotificationService;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService;
+import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
+import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
 
 /**
- * Created by Martin Bobak <mbobak@cisco.com> on 27.3.2015.
+ * Plugin services provider
  */
-public interface OpenFlowPluginProvider extends AutoCloseable {
-
-
-    public void onSessionInitiated(BindingAwareBroker.ProviderContext session);
+public interface OpenFlowPluginProvider extends AutoCloseable, BindingService {
 
     /**
      * Method sets openflow java's connection providers.
      */
-    public void setSwitchConnectionProviders(Collection<SwitchConnectionProvider> switchConnectionProvider);
-
+    void setSwitchConnectionProviders(Collection<SwitchConnectionProvider> switchConnectionProvider);
 
     /**
-     * Method sets role of this application in clustered environment.
+     * setter
+     *
+     * @param dataBroker
      */
-    public void setRole(OfpRole role);
+    void setDataBroker(DataBroker dataBroker);
+
+    void setRpcProviderRegistry(RpcProviderRegistry rpcProviderRegistry);
+
+    void setNotificationProviderService(NotificationService notificationProviderService);
+
+    void setNotificationPublishService(NotificationPublishService notificationPublishService);
 
     /**
      * Method initializes all DeviceManager, RpcManager and related contexts.
      */
-    public void initialize();
+    void initialize();
+
+    /**
+     * This parameter indicates whether it is mandatory for switch to support OF1.3 features : table, flow, meter,group.
+     * If this is set to true and switch doesn't support these features its connection will be denied.
+     * @param switchFeaturesMandatory
+     */
+    void setSwitchFeaturesMandatory(final boolean switchFeaturesMandatory);
+
+    boolean isSwitchFeaturesMandatory();
+
+    boolean isStatisticsPollingOff();
+
+    void setIsStatisticsPollingOff(final boolean isStatisticsPollingOff);
+
+    /**
+     * Backward compatibility feature - exposing rpc for statistics polling (result is provided in form of async notification)
+     *
+     * @param isStatisticsRpcEnabled
+     */
+    void setIsStatisticsRpcEnabled(boolean isStatisticsRpcEnabled);
+
+    void setBarrierCountLimit(int barrierCountLimit);
+
+    void setBarrierInterval(long barrierTimeoutLimit);
+
+    void setEchoReplyTimeout(long echoReplyTimeout);
+
+
+    void setNotificationFlowRemovedOff(boolean isNotificationFlowRemovedOff);
 
+    void update(Map<String,Object> props);
+    void setClusteringSingletonServicesProvider(ClusterSingletonServiceProvider singletonServicesProvider);
 }