Merge "BUG 2676 : Use custom client-dispatcher when configured"
[controller.git] / opendaylight / netconf / netconf-mapping-api / src / main / java / org / opendaylight / controller / netconf / mapping / api / NetconfOperationServiceFactory.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.netconf.mapping.api;
10
11 import java.util.Set;
12 import org.opendaylight.controller.netconf.api.Capability;
13 import org.opendaylight.controller.netconf.api.monitoring.CapabilityListener;
14
15 /**
16  * Factory that must be registered in OSGi service registry in order to be used
17  * by netconf-impl. Responsible for creating per-session instances of
18  * {@link NetconfOperationService}.
19  */
20 public interface NetconfOperationServiceFactory {
21
22     /**
23      * Get capabilities supported by current operation service.
24      */
25     Set<Capability> getCapabilities();
26
27     /**
28      * Supported capabilities may change over time, registering a listener allows for push based information retrieval about current notifications
29      */
30     AutoCloseable registerCapabilityListener(CapabilityListener listener);
31
32     NetconfOperationService createService(String netconfSessionIdForReporting);
33
34 }