blob: 69d29f5491ee5bf7038bfa992b623d232f61bbff [file] [log] [blame]
gyewan.an91d7e7e2019-01-17 15:12:48 +09001/*
gyewan.an3c99ee72019-02-18 15:53:55 +09002 * Copyright 2019-present Open Networking Foundation
gyewan.an91d7e7e2019-01-17 15:12:48 +09003 *
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 */
16package org.onosproject.netconf;
17
gyewan.an3c99ee72019-02-18 15:53:55 +090018import java.util.Set;
19
gyewan.an91d7e7e2019-01-17 15:12:48 +090020/**
21 * Abstract interface for the implementation of proxy message handler.
22 */
23public 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.an3c99ee72019-02-18 15:53:55 +090033
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.an91d7e7e2019-01-17 15:12:48 +090061}