blob: 76ea44bd5d8e16b328645c143b2e8a3c07de4c16 [file] [log] [blame]
jiangruie3d60b12015-11-25 16:27:04 +08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
jiangruie3d60b12015-11-25 16:27:04 +08003 *
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.vtnrsc.routerinterface;
17
18import java.util.Collection;
19
20import org.onosproject.vtnrsc.RouterInterface;
21import org.onosproject.vtnrsc.SubnetId;
22
23/**
24 * Service for interacting with the inventory of Router interface.
25 */
26public interface RouterInterfaceService {
27 /**
28 * Returns exists or not of specific subnet identifier.
29 *
30 * @param subnetId subnet identifier
31 * @return true or false
32 */
33 boolean exists(SubnetId subnetId);
34
35 /**
36 * Returns a collection of the currently known Router interface.
37 *
38 * @return collection of RouterInterface
39 */
40 Collection<RouterInterface> getRouterInterfaces();
41
42 /**
43 * Returns the Router interface with the specified subnet identifier.
44 *
45 * @param subnetId subnet identifier
46 * @return RouterInterface or null if one with the given identifier is not
47 * known
48 */
49 RouterInterface getRouterInterface(SubnetId subnetId);
50
51 /**
52 * Adds the specified RouterInterface.
53 *
54 * @param routerInterface the interface add to router
55 * @return true if add router interface successfully
56 */
57 boolean addRouterInterface(RouterInterface routerInterface);
58
59 /**
60 * Removes the specified RouterInterface.
61 *
62 * @param routerInterface the interface remove from router
63 * @return true if remove router interface successfully
64 */
65 boolean removeRouterInterface(RouterInterface routerInterface);
66
67 /**
68 * Adds the specified listener to Router Interface manager.
69 *
70 * @param listener Router Interface listener
71 */
72 void addListener(RouterInterfaceListener listener);
73
74 /**
75 * Removes the specified listener to RouterInterface manager.
76 *
77 * @param listener Router Interface listener
78 */
79 void removeListener(RouterInterfaceListener listener);
80}