Add EOS listener.
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / lifecycle / ContextChainHolder.java
index 9012511514aa2f5549628711cdeeccf62f699ae3..13e8fc29eb8d7f7a50b576f9c1435a3190dccb05 100644 (file)
@@ -7,6 +7,8 @@
  */
 package org.opendaylight.openflowplugin.api.openflow.lifecycle;
 
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListener;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService;
 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
 import org.opendaylight.openflowplugin.api.openflow.OFPManager;
 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
@@ -23,7 +25,9 @@ import org.opendaylight.openflowplugin.api.openflow.statistics.StatisticsManager
 public interface ContextChainHolder extends
         DeviceConnectedHandler,
         MastershipChangeListener,
-        DeviceDisconnectedHandler {
+        DeviceDisconnectedHandler,
+        EntityOwnershipListener,
+        AutoCloseable{
 
     /**
      * Managers need to be added before.
@@ -81,4 +85,13 @@ public interface ContextChainHolder extends
      */
     void setNeverDropContextChain(final Boolean neverDropChain);
 
+    /**
+     * Register EOS listener.
+     * @param entityOwnershipService EOS services
+     */
+    void changeEntityOwnershipService(final EntityOwnershipService entityOwnershipService);
+
+    @Override
+    void close() throws Exception;
+
 }