blob: afd0fec076e4ac72df3f058a1ec539b3b26a61d2 [file] [log] [blame]
sunish vk30637eb2016-02-16 15:19:32 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
sunish vk30637eb2016-02-16 15:19:32 +05303 *
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.ospf.controller;
17
18import org.onlab.packet.Ip4Address;
19
20import java.util.List;
21
22/**
23 * Representation of an OSPF device information.
24 */
25public interface DeviceInformation {
26
27 /**
28 * Gets router id.
29 *
30 * @return router id
31 */
32 Ip4Address routerId();
33
34 /**
35 * Sets router id.
36 *
37 * @param routId router id
38 */
39 void setRouterId(Ip4Address routId);
40
41 /**
42 * Gets device id.
43 *
44 * @return device id
45 */
46 Ip4Address deviceId();
47
48 /**
49 * Sets device id.
50 *
51 * @param deviceId device id
52 */
53 void setDeviceId(Ip4Address deviceId);
54
55 /**
56 * Gets list of interface ids.
57 *
58 * @return list of interface ids
59 */
60 List<Ip4Address> interfaceId();
61
62 /**
63 * Adds interface id to list.
64 *
65 * @param interfaceId interface id
66 */
67 void addInterfaceId(Ip4Address interfaceId);
68
69 /**
70 * Gets area id.
71 *
72 * @return area id
73 */
74 Ip4Address areaId();
75
76 /**
77 * Sets area id.
78 *
79 * @param areaId area id
80 */
81 void setAreaId(Ip4Address areaId);
82
83 /**
84 * Gets device information is already created or not.
85 *
86 * @return true if device information is already created else false
87 */
88 boolean isAlreadyCreated();
89
90 /**
91 * Sets device information is already created or not.
92 *
93 * @param alreadyCreated true if device information is already created else false
94 */
95 void setAlreadyCreated(boolean alreadyCreated);
96
97 /**
98 * Gets device is dr or not.
99 *
100 * @return true if device is dr else false
101 */
102 boolean isDr();
103
104 /**
105 * Sets device is dr or not.
106 *
107 * @param dr true if device is dr else false
108 */
109 void setDr(boolean dr);
110
111 /**
112 * Gets neighbor id.
113 *
114 * @return neighbor id
115 */
116 Ip4Address neighborId();
117
118 /**
119 * Sets neighbor id.
120 *
121 * @param neighborId neighbor id
122 */
123 void setNeighborId(Ip4Address neighborId);
124}