Merge "Do not override jsr305 version"
[controller.git] / opendaylight / netconf / netconf-mapping-api / src / main / java / org / opendaylight / controller / netconf / mapping / api / NetconfOperationServiceFactory.java
index 46b9cd22e06bb35cba2875fa6b05a9ca02b92454..8caa177bfa525dd87ce38a1e914d1920dc1dc1be 100644 (file)
@@ -8,6 +8,10 @@
 
 package org.opendaylight.controller.netconf.mapping.api;
 
+import java.util.Set;
+import org.opendaylight.controller.netconf.api.Capability;
+import org.opendaylight.controller.netconf.api.monitoring.CapabilityListener;
+
 /**
  * Factory that must be registered in OSGi service registry in order to be used
  * by netconf-impl. Responsible for creating per-session instances of
@@ -15,6 +19,16 @@ package org.opendaylight.controller.netconf.mapping.api;
  */
 public interface NetconfOperationServiceFactory {
 
-    NetconfOperationService createService(long netconfSessionId, String netconfSessionIdForReporting);
+    /**
+     * Get capabilities supported by current operation service.
+     */
+    Set<Capability> getCapabilities();
+
+    /**
+     * Supported capabilities may change over time, registering a listener allows for push based information retrieval about current notifications
+     */
+    AutoCloseable registerCapabilityListener(CapabilityListener listener);
+
+    NetconfOperationService createService(String netconfSessionIdForReporting);
 
 }