andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.netconf; |
| 18 | |
Akihiro Yamanouchi | 4512222 | 2016-07-15 13:13:11 +0900 | [diff] [blame] | 19 | import com.google.common.annotations.Beta; |
Andrea Campanella | c362784 | 2017-04-04 18:06:54 +0200 | [diff] [blame^] | 20 | import org.slf4j.Logger; |
| 21 | import org.slf4j.LoggerFactory; |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 22 | |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 23 | import java.util.List; |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 24 | import java.util.concurrent.CompletableFuture; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 25 | |
| 26 | /** |
| 27 | * NETCONF session object that allows NETCONF operations on top with the physical |
| 28 | * device on top of an SSH connection. |
| 29 | */ |
Sean Condon | d2c8d47 | 2017-02-17 17:09:39 +0000 | [diff] [blame] | 30 | // TODO change return type of methods to <Capability, XMLdoc, string or yang obj> |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 31 | public interface NetconfSession { |
| 32 | |
| 33 | /** |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 34 | * Executes an asynchronous RPC to the server and obtains a future to be completed. |
| 35 | * |
Sean Condon | d2c8d47 | 2017-02-17 17:09:39 +0000 | [diff] [blame] | 36 | * The caller must ensure that the message-id in any request is unique |
| 37 | * for the session |
| 38 | * |
| 39 | * @deprecated - 1.10.0 do not remove needs reworking |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 40 | * @param request the XML containing the RPC for the server. |
| 41 | * @return Server response or ERROR |
| 42 | * @throws NetconfException when there is a problem in the communication process on |
| 43 | * the underlying connection |
| 44 | */ |
Sean Condon | d2c8d47 | 2017-02-17 17:09:39 +0000 | [diff] [blame] | 45 | @Deprecated |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 46 | CompletableFuture<String> request(String request) throws NetconfException; |
| 47 | |
| 48 | |
| 49 | /** |
Sean Condon | d2c8d47 | 2017-02-17 17:09:39 +0000 | [diff] [blame] | 50 | * Retrieves the requested configuration, different from get-config. |
Andrea Campanella | f4fd035 | 2015-12-14 17:03:05 -0800 | [diff] [blame] | 51 | * |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 52 | * @param request the XML containing the request to the server. |
| 53 | * @return device running configuration |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 54 | * @throws NetconfException when there is a problem in the communication process on |
| 55 | * the underlying connection |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 56 | */ |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 57 | String get(String request) throws NetconfException; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 58 | |
| 59 | /** |
Sean Condon | d2c8d47 | 2017-02-17 17:09:39 +0000 | [diff] [blame] | 60 | * Retrieves the requested data. |
Akihiro Yamanouchi | 5e5d4df | 2016-06-08 17:06:33 +0900 | [diff] [blame] | 61 | * |
| 62 | * @param filterSchema XML subtrees to include in the reply |
| 63 | * @param withDefaultsMode with-defaults mode |
| 64 | * @return Server response |
| 65 | * @throws NetconfException when there is a problem in the communication process on |
| 66 | * the underlying connection |
| 67 | */ |
| 68 | String get(String filterSchema, String withDefaultsMode) |
| 69 | throws NetconfException; |
| 70 | |
| 71 | /** |
Akihiro Yamanouchi | 4512222 | 2016-07-15 13:13:11 +0900 | [diff] [blame] | 72 | * Executes an synchronous RPC to the server and wrap the request in RPC header. |
Akihiro Yamanouchi | 8d3a9d3 | 2016-07-12 11:41:44 +0900 | [diff] [blame] | 73 | * |
| 74 | * @param request the XML containing the request to the server. |
| 75 | * @return Server response or ERROR |
| 76 | * @throws NetconfException when there is a problem in the communication process on |
| 77 | * the underlying connection |
| 78 | */ |
| 79 | String doWrappedRpc(String request) throws NetconfException; |
| 80 | |
| 81 | /** |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 82 | * Executes an synchronous RPC to the server. |
Andrea Campanella | f4fd035 | 2015-12-14 17:03:05 -0800 | [diff] [blame] | 83 | * |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 84 | * @param request the XML containing the RPC for the server. |
| 85 | * @return Server response or ERROR |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 86 | * @throws NetconfException when there is a problem in the communication process on |
| 87 | * the underlying connection |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 88 | */ |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 89 | String requestSync(String request) throws NetconfException; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 90 | |
| 91 | /** |
| 92 | * Retrives the specified configuration. |
| 93 | * |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 94 | * @param netconfTargetConfig the type of configuration to retrieve. |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 95 | * @return specified configuration. |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 96 | * @throws NetconfException when there is a problem in the communication process on |
| 97 | * the underlying connection |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 98 | */ |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 99 | String getConfig(TargetConfig netconfTargetConfig) throws NetconfException; |
| 100 | |
| 101 | /** |
| 102 | * Retrives the specified configuration. |
| 103 | * |
| 104 | * @param netconfTargetConfig the type of configuration to retrieve. |
| 105 | * @return specified configuration. |
| 106 | * @throws NetconfException when there is a problem in the communication process on |
| 107 | * the underlying connection |
| 108 | * @deprecated - 1.10.0 Kingfisher use method overload that accepts |
| 109 | * org.onosproject.netconf.TargetConfig enum parameter instead |
| 110 | */ |
| 111 | @Deprecated |
| 112 | String getConfig(String netconfTargetConfig) throws NetconfException; |
| 113 | |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 114 | |
| 115 | /** |
| 116 | * Retrives part of the specivied configuration based on the filterSchema. |
| 117 | * |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 118 | * @param netconfTargetConfig the type of configuration to retrieve. |
| 119 | * @param configurationFilterSchema XML schema to filter the configuration |
| 120 | * elements we are interested in |
| 121 | * @return device running configuration. |
| 122 | * @throws NetconfException when there is a problem in the communication process on |
| 123 | * the underlying connection |
| 124 | * @deprecated - 1.10.0 Kingfisher use method overload that accepts |
| 125 | * org.onosproject.netconf.TargetConfig enum parameter instead |
| 126 | */ |
| 127 | @Deprecated |
| 128 | String getConfig(String netconfTargetConfig, String configurationFilterSchema) |
| 129 | throws NetconfException; |
| 130 | |
| 131 | /** |
| 132 | * Retrives part of the specivied configuration based on the filterSchema. |
| 133 | * |
| 134 | * @param netconfTargetConfig the type of configuration to retrieve. |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 135 | * @param configurationFilterSchema XML schema to filter the configuration |
| 136 | * elements we are interested in |
| 137 | * @return device running configuration. |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 138 | * @throws NetconfException when there is a problem in the communication process on |
| 139 | * the underlying connection |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 140 | */ |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 141 | String getConfig(TargetConfig netconfTargetConfig, String configurationFilterSchema) |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 142 | throws NetconfException; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 143 | |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 144 | |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 145 | /** |
| 146 | * Retrives part of the specified configuration based on the filterSchema. |
| 147 | * |
| 148 | * @param newConfiguration configuration to set |
| 149 | * @return true if the configuration was edited correctly |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 150 | * @throws NetconfException when there is a problem in the communication process on |
| 151 | * the underlying connection |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 152 | */ |
| 153 | |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 154 | boolean editConfig(String newConfiguration) throws NetconfException; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 155 | |
| 156 | /** |
Andrea Campanella | f4fd035 | 2015-12-14 17:03:05 -0800 | [diff] [blame] | 157 | * Retrives part of the specified configuration based on the filterSchema. |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 158 | * |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 159 | * @param netconfTargetConfig the targetConfiguration to change |
| 160 | * @param mode selected mode to change the configuration |
| 161 | * @param newConfiguration configuration to set |
| 162 | * @return true if the configuration was edited correctly |
| 163 | * @throws NetconfException when there is a problem in the communication process on |
| 164 | * the underlying connection |
| 165 | * @deprecated - 1.10.0 Kingfisher use method overload that accepts |
| 166 | * org.onosproject.netconf.TargetConfig enum parameter instead |
| 167 | */ |
| 168 | @Deprecated |
| 169 | boolean editConfig(String netconfTargetConfig, String mode, String newConfiguration) |
| 170 | throws NetconfException; |
| 171 | |
| 172 | /** |
| 173 | * Retrives part of the specified configuration based on the filterSchema. |
| 174 | * |
| 175 | * @param netconfTargetConfig the targetConfiguration to change |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 176 | * @param mode selected mode to change the configuration |
| 177 | * @param newConfiguration configuration to set |
Andrea Campanella | f4fd035 | 2015-12-14 17:03:05 -0800 | [diff] [blame] | 178 | * @return true if the configuration was edited correctly |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 179 | * @throws NetconfException when there is a problem in the communication process on |
| 180 | * the underlying connection |
Andrea Campanella | f4fd035 | 2015-12-14 17:03:05 -0800 | [diff] [blame] | 181 | */ |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 182 | boolean editConfig(TargetConfig netconfTargetConfig, String mode, String newConfiguration) |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 183 | throws NetconfException; |
Andrea Campanella | f4fd035 | 2015-12-14 17:03:05 -0800 | [diff] [blame] | 184 | |
| 185 | /** |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 186 | * Copies the new configuration, an Url or a complete configuration xml tree |
| 187 | * to the target configuration. |
| 188 | * The target configuration can't be the running one |
| 189 | * |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 190 | * @param netconfTargetConfig the type of configuration to retrieve. |
| 191 | * @param newConfiguration configuration to set |
| 192 | * @return true if the configuration was copied correctly |
| 193 | * @throws NetconfException when there is a problem in the communication process on |
| 194 | * the underlying connection |
| 195 | * @deprecated - 1.10.0 Kingfisher use method overload that accepts |
| 196 | * org.onosproject.netconf.TargetConfig enum parameter instead |
| 197 | */ |
| 198 | @Deprecated |
| 199 | boolean copyConfig(String netconfTargetConfig, String newConfiguration) |
| 200 | throws NetconfException; |
| 201 | |
| 202 | /** |
| 203 | * Copies the new configuration, an Url or a complete configuration xml tree |
| 204 | * to the target configuration. |
| 205 | * The target configuration can't be the running one |
| 206 | * |
| 207 | * @param netconfTargetConfig the type of configuration to retrieve. |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 208 | * @param newConfiguration configuration to set |
| 209 | * @return true if the configuration was copied correctly |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 210 | * @throws NetconfException when there is a problem in the communication process on |
| 211 | * the underlying connection |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 212 | */ |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 213 | boolean copyConfig(TargetConfig netconfTargetConfig, String newConfiguration) |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 214 | throws NetconfException; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 215 | |
| 216 | /** |
| 217 | * Deletes part of the specified configuration based on the filterSchema. |
| 218 | * |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 219 | * @param netconfTargetConfig the name of the configuration to delete |
| 220 | * @return true if the configuration was copied correctly |
| 221 | * @throws NetconfException when there is a problem in the communication process on |
| 222 | * the underlying connection |
| 223 | * @deprecated - 1.10.0 Kingfisher use method overload that accepts |
| 224 | * org.onosproject.netconf.TargetConfig enum parameter instead |
| 225 | */ |
| 226 | @Deprecated |
| 227 | boolean deleteConfig(String netconfTargetConfig) throws NetconfException; |
| 228 | |
| 229 | /** |
| 230 | * Deletes part of the specified configuration based on the filterSchema. |
| 231 | * |
| 232 | * @param netconfTargetConfig the name of the configuration to delete |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 233 | * @return true if the configuration was copied correctly |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 234 | * @throws NetconfException when there is a problem in the communication process on |
| 235 | * the underlying connection |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 236 | */ |
Andrei Mihaescu | ac542ca | 2017-03-26 21:36:25 +0300 | [diff] [blame] | 237 | boolean deleteConfig(TargetConfig netconfTargetConfig) throws NetconfException; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 238 | |
| 239 | /** |
helenyrwu | 0407c64 | 2016-06-09 12:01:30 -0700 | [diff] [blame] | 240 | * Starts subscription to the device's notifications. |
| 241 | * |
| 242 | * @throws NetconfException when there is a problem starting the subscription |
| 243 | */ |
| 244 | void startSubscription() throws NetconfException; |
| 245 | |
| 246 | /** |
Akihiro Yamanouchi | 4512222 | 2016-07-15 13:13:11 +0900 | [diff] [blame] | 247 | * Starts subscription to the device's notifications. |
| 248 | * |
| 249 | * @param filterSchema XML subtrees to indicate specific notification |
| 250 | * @throws NetconfException when there is a problem starting the subscription |
| 251 | */ |
| 252 | @Beta |
| 253 | void startSubscription(String filterSchema) throws NetconfException; |
| 254 | |
| 255 | /** |
helenyrwu | 0407c64 | 2016-06-09 12:01:30 -0700 | [diff] [blame] | 256 | * Ends subscription to the device's notifications. |
| 257 | * |
| 258 | * @throws NetconfException when there is a problem ending the subscription |
| 259 | */ |
| 260 | void endSubscription() throws NetconfException; |
| 261 | |
| 262 | /** |
| 263 | * Locks the specified configuration. |
| 264 | * |
| 265 | * @param configType type of configuration to be locked |
| 266 | * @return true if successful. |
| 267 | * @throws NetconfException when there is a problem in the communication process on |
| 268 | * the underlying connection |
| 269 | */ |
| 270 | boolean lock(String configType) throws NetconfException; |
| 271 | |
| 272 | /** |
| 273 | * Unlocks the specified configuration. |
| 274 | * |
| 275 | * @param configType type of configuration to be locked |
| 276 | * @return true if successful. |
| 277 | * @throws NetconfException when there is a problem in the communication process on |
| 278 | * the underlying connection |
| 279 | */ |
| 280 | boolean unlock(String configType) throws NetconfException; |
| 281 | |
| 282 | /** |
| 283 | * Locks the running configuration. |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 284 | * |
| 285 | * @return true if successful. |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 286 | * @throws NetconfException when there is a problem in the communication process on |
| 287 | * the underlying connection |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 288 | */ |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 289 | boolean lock() throws NetconfException; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 290 | |
| 291 | /** |
helenyrwu | 0407c64 | 2016-06-09 12:01:30 -0700 | [diff] [blame] | 292 | * Unlocks the running configuration. |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 293 | * |
| 294 | * @return true if successful. |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 295 | * @throws NetconfException when there is a problem in the communication process on |
| 296 | * the underlying connection |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 297 | */ |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 298 | boolean unlock() throws NetconfException; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 299 | |
| 300 | /** |
| 301 | * Closes the Netconf session with the device. |
| 302 | * the first time it tries gracefully, then kills it forcefully |
Andrea Campanella | f4fd035 | 2015-12-14 17:03:05 -0800 | [diff] [blame] | 303 | * |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 304 | * @return true if closed |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 305 | * @throws NetconfException when there is a problem in the communication process on |
| 306 | * the underlying connection |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 307 | */ |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 308 | boolean close() throws NetconfException; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 309 | |
| 310 | /** |
| 311 | * Gets the session ID of the Netconf session. |
| 312 | * |
| 313 | * @return Session ID as a string. |
| 314 | */ |
| 315 | String getSessionId(); |
| 316 | |
| 317 | /** |
| 318 | * Gets the capabilities of the Netconf server associated to this session. |
| 319 | * |
| 320 | * @return Network capabilities as a string. |
| 321 | */ |
| 322 | String getServerCapabilities(); |
| 323 | |
| 324 | /** |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 325 | * Sets the ONOS side capabilities. |
Andrea Campanella | f4fd035 | 2015-12-14 17:03:05 -0800 | [diff] [blame] | 326 | * |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 327 | * @param capabilities list of capabilities the device has. |
| 328 | */ |
| 329 | void setDeviceCapabilities(List<String> capabilities); |
| 330 | |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 331 | /** |
Andrea Campanella | c362784 | 2017-04-04 18:06:54 +0200 | [diff] [blame^] | 332 | * Checks the state of the underlying SSH session and connection |
| 333 | * and if necessary it reestablishes it. |
| 334 | * Should be implemented, providing a default here for retrocompatibility. |
| 335 | * @throws NetconfException when there is a problem in reestablishing |
| 336 | * the connection or the session to the device. |
| 337 | */ |
| 338 | |
| 339 | default void checkAndReestablish() throws NetconfException { |
| 340 | Logger log = LoggerFactory.getLogger(NetconfSession.class); |
| 341 | log.error("Not implemented/exposed by the underlying session implementation"); |
| 342 | } |
| 343 | |
| 344 | /** |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 345 | * Remove a listener from the underlying stream handler implementation. |
| 346 | * |
| 347 | * @param listener event listener. |
| 348 | */ |
| 349 | void addDeviceOutputListener(NetconfDeviceOutputEventListener listener); |
| 350 | |
| 351 | /** |
| 352 | * Remove a listener from the underlying stream handler implementation. |
| 353 | * |
| 354 | * @param listener event listener. |
| 355 | */ |
| 356 | void removeDeviceOutputListener(NetconfDeviceOutputEventListener listener); |
| 357 | |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 358 | } |