Cleanup switch certificate chain handling
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / OFPManager.java
index 1879a4c55ac38b1d2548308bc581bbb97c5fea9c..38e2a36c58fc82c25045bb018d0be2f090e5a8ac 100644 (file)
@@ -1,19 +1,25 @@
 /*
- * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ * Copyright (c) 2016 Pantheon Technologies s.r.o. 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
  */
+
 package org.opendaylight.openflowplugin.api.openflow;
 
-import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
+import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceRemovedHandler;
 
 /**
- * Generic API for all managers
+ * This interface is responsible for managing lifecycle of itself and all it's associated contexts.
+ * Every manager that implements this interface must handle internal map of contexts by implementing methods from
+ * {@link org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceRemovedHandler}. And at last, it must
+ * handle it's own full termination by implementing {@link AutoCloseable#close()}
  */
-public interface OFPManager {
-
-    <T extends OFPContext> T gainContext(final DeviceInfo deviceInfo);
+public interface OFPManager extends
+        DeviceRemovedHandler,
+        AutoCloseable {
 
+    @Override
+    void close();
 }