gyewan.an | 91d7e7e | 2019-01-17 15:12:48 +0900 | [diff] [blame] | 1 | /* |
gyewan.an | 3c99ee7 | 2019-02-18 15:53:55 +0900 | [diff] [blame^] | 2 | * Copyright 2019-present Open Networking Foundation |
gyewan.an | 91d7e7e | 2019-01-17 15:12:48 +0900 | [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 | package org.onosproject.netconf; |
| 17 | |
gyewan.an | 3c99ee7 | 2019-02-18 15:53:55 +0900 | [diff] [blame^] | 18 | import java.util.Set; |
| 19 | |
gyewan.an | 91d7e7e | 2019-01-17 15:12:48 +0900 | [diff] [blame] | 20 | /** |
| 21 | * Abstract interface for the implementation of proxy message handler. |
| 22 | */ |
| 23 | public interface NetconfProxyMessageHandler { |
| 24 | /** |
| 25 | * Will decode the message on case basis and |
| 26 | * call the actual method in Netconf Session implementation bound to secure transport. |
| 27 | * @param proxyMessage incoming proxy message |
| 28 | * @param <T> return type |
| 29 | * @return the value returned by session call |
| 30 | * @throws NetconfException netconf exception |
| 31 | */ |
| 32 | <T> T handleIncomingMessage(NetconfProxyMessage proxyMessage) throws NetconfException; |
gyewan.an | 3c99ee7 | 2019-02-18 15:53:55 +0900 | [diff] [blame^] | 33 | |
| 34 | /** |
| 35 | * Will decode the message on case basis and |
| 36 | * call the actual method in Netconf Session implementation bound to secure transport. |
| 37 | * @param replyMessage incoming reply message |
| 38 | * @param <T> return type |
| 39 | * @return the value returned by session call |
| 40 | * @throws NetconfException netconf exception |
| 41 | */ |
| 42 | <T> T handleReplyMessage(NetconfProxyMessage replyMessage) throws NetconfException; |
| 43 | |
| 44 | /** |
| 45 | * Will decode the message on case basis and |
| 46 | * call the actual method in Netconf Session implementation bound to secure transport. |
| 47 | * @param proxyMessage incoming proxy message |
| 48 | * @return the set value returned by session call |
| 49 | * @throws NetconfException netconf exception |
| 50 | */ |
| 51 | Set<String> handleIncomingSetMessage(NetconfProxyMessage proxyMessage) throws NetconfException; |
| 52 | |
| 53 | /** |
| 54 | * Will decode the message on case basis and |
| 55 | * call the actual method in Netconf Session implementation bound to secure transport. |
| 56 | * @param replyMessage incoming proxy message |
| 57 | * @return the set value returned by session call |
| 58 | * @throws NetconfException netconf exception |
| 59 | */ |
| 60 | Set<String> handleReplySetMessage(NetconfProxyMessage replyMessage) throws NetconfException; |
gyewan.an | 91d7e7e | 2019-01-17 15:12:48 +0900 | [diff] [blame] | 61 | } |