sunish vk | 30637eb | 2016-02-16 15:19:32 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
sunish vk | 30637eb | 2016-02-16 15:19:32 +0530 | [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.ospf.controller; |
| 17 | |
| 18 | import org.onlab.packet.Ip4Address; |
| 19 | |
| 20 | import java.util.List; |
| 21 | |
| 22 | /** |
| 23 | * Representation of an OSPF device information. |
| 24 | */ |
| 25 | public 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 | } |