DeviceState changes
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / lifecycle / LifecycleConductor.java
index 63042e0b742f6a449634b1905a10eeb584fe66ff..05e67d86a838f6ecf4211517be626ca91ae20790 100644 (file)
@@ -11,7 +11,9 @@ package org.opendaylight.openflowplugin.api.openflow.lifecycle;
 import io.netty.util.Timeout;
 import io.netty.util.TimerTask;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
+import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceManager;
+import org.opendaylight.openflowplugin.api.openflow.statistics.StatisticsManager;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageIntelligenceAgency;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 
@@ -26,24 +28,24 @@ public interface LifecycleConductor {
 
     /**
      * Returns device context from device manager device contexts maps
-     * @param nodeId node identification
-     * @return null if context doesn't exists
+     *
+     * @param deviceInfo@return null if context doesn't exists
      */
-    DeviceContext getDeviceContext(final NodeId nodeId);
+    DeviceContext getDeviceContext(DeviceInfo deviceInfo);
 
     /**
      * Registers ont time listener for notify when services rpc, statistics are done stop or start
      * @param manager service change listener
-     * @param nodeId node identification
+     * @param deviceInfo node identification
      */
-    void addOneTimeListenerWhenServicesChangesDone(final ServiceChangeListener manager, final NodeId nodeId);
+    void addOneTimeListenerWhenServicesChangesDone(final ServiceChangeListener manager, final DeviceInfo deviceInfo);
 
     /**
      * Returns device of version
-     * @param nodeId node identification
+     * @param deviceInfo node identification
      * @return null if device context doesn't exists
      */
-    Short gainVersionSafely(final NodeId nodeId);
+    Short gainVersionSafely(final DeviceInfo deviceInfo);
 
     /**
      * Set new timeout for {@link io.netty.util.HashedWheelTimer}
@@ -62,9 +64,9 @@ public interface LifecycleConductor {
 
     /**
      * Interrupt connection for the node
-     * @param nodeId node identification
+     * @param deviceInfo node identification
      */
-    void closeConnection(final NodeId nodeId);
+    void closeConnection(final DeviceInfo deviceInfo);
 
     /**
      * Setter for device manager once set it cant be unset or overwritten
@@ -72,10 +74,16 @@ public interface LifecycleConductor {
      */
     void setSafelyDeviceManager(final DeviceManager deviceManager);
 
+    /**
+     * Setter for statistics manager once set it cant be unset or overwritten
+     * @param statisticsManager should be set in OpenFlowPluginProviderImpl
+     */
+    void setSafelyStatisticsManager(final StatisticsManager statisticsManager);
+
     /**
      * Xid from outboundqueue
-     * @param nodeId
+     * @param deviceInfo
      * @return
      */
-    Long reserveXidForDeviceMessage(final NodeId nodeId);
+    Long reserveXidForDeviceMessage(final DeviceInfo deviceInfo);
 }