b13030dee37706c095b99925846c366b86046372
[ccsdk/features.git] /
1 /*
2  * ============LICENSE_START========================================================================
3  * ONAP : ccsdk feature sdnr wt
4  * =================================================================================================
5  * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
6  * =================================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8  * in compliance with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software distributed under the License
13  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14  * or implied. See the License for the specific language governing permissions and limitations under
15  * the License.
16  * ============LICENSE_END==========================================================================
17  */
18 package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
19
20 import com.google.common.util.concurrent.ListenableFuture;
21 import java.util.List;
22 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.CreateSubscriptionOutput;
23 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.Stream;
24 import org.opendaylight.yangtools.yang.common.RpcResult;
25
26 /**
27  * Interface handling netconf connection.
28  */
29 public interface NetconfNotifications {
30
31     static String DefaultNotificationsStream = "NETCONF";
32
33     /**
34      * check if the device supports notifications.yang
35      * @return true if notifications.yang is supported
36      */
37     boolean isNotificationsSupported();
38
39     /**
40      * check if the device supports notifications.yang
41      * @return true if nc-notifications.yang is supported
42      */
43     boolean isNCNotificationsSupported();
44     /**
45      * Get all notification streams
46      * @return stream list
47      */
48     List<Stream> getNotificationStreams();
49
50     /**
51      * Register notifications stream for the connection
52      *
53      * @param streamList that contains a list of streams to be subscribed for notifications
54      * @return progress indication
55      */
56     void registerNotificationsStream(List<Stream> streamList);
57
58     /**
59      * Register notifications stream for the connection.
60      *
61      * @param streamName that should be "NETCONF" as default.
62      * @return progress indication
63      */
64     ListenableFuture<RpcResult<CreateSubscriptionOutput>> registerNotificationsStream(String streamName);
65
66 }