Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 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 | |
| 17 | package org.onosproject.pcepio.protocol; |
| 18 | |
| 19 | import org.jboss.netty.buffer.ChannelBuffer; |
| 20 | import org.onosproject.pcepio.exceptions.PcepParseException; |
| 21 | import org.onosproject.pcepio.types.PcepObjectHeader; |
| 22 | |
| 23 | /** |
| 24 | * Abstraction of an entity providing PCEP FEC Object of Type is 5 Unnumbered Adjacency with IPv4 NodeIDs. |
| 25 | */ |
| 26 | public interface PcepFecObjectIPv4UnnumberedAdjacency extends PcepFecObject { |
| 27 | |
| 28 | /** |
| 29 | * Returns Local NodeID of FEC Object. |
| 30 | * |
| 31 | * @return Local NodeID of FEC Object |
| 32 | */ |
| 33 | int getLocalNodeID(); |
| 34 | |
| 35 | /** |
| 36 | * Sets Local NodeID with specified value. |
| 37 | * |
| 38 | * @param value Local NodeID |
| 39 | */ |
| 40 | void setLocalNodeID(int value); |
| 41 | |
| 42 | /** |
| 43 | * Returns Local InterfaceID of FEC Object. |
| 44 | * |
| 45 | * @return Local InterfaceID of FEC Object |
| 46 | */ |
| 47 | int getLocalInterfaceID(); |
| 48 | |
| 49 | /** |
| 50 | * Sets Local InterfaceID with specified value. |
| 51 | * |
| 52 | * @param value Local InterfaceID |
| 53 | */ |
| 54 | void setLocalInterfaceID(int value); |
| 55 | |
| 56 | /** |
| 57 | * Returns Remote NodeID of FEC Object. |
| 58 | * |
| 59 | * @return Remote NodeID of FEC Object |
| 60 | */ |
| 61 | int getRemoteNodeID(); |
| 62 | |
| 63 | /** |
| 64 | * Sets Remote NodeID with specified value. |
| 65 | * |
| 66 | * @param value Remote NodeID |
| 67 | */ |
| 68 | void setRemoteNodeID(int value); |
| 69 | |
| 70 | /** |
| 71 | * Returns Remote InterfaceID of FEC Object. |
| 72 | * |
| 73 | * @return Remote InterfaceID of FEC Object |
| 74 | */ |
| 75 | int getRemoteInterfaceID(); |
| 76 | |
| 77 | /** |
| 78 | * Sets Remote InterfaceID with specified value. |
| 79 | * |
| 80 | * @param value Remote InterfaceID |
| 81 | */ |
| 82 | void setRemoteInterfaceID(int value); |
| 83 | |
| 84 | @Override |
Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +0530 | [diff] [blame] | 85 | int write(ChannelBuffer bb) throws PcepParseException; |
| 86 | |
| 87 | /** |
| 88 | * Builder interface with get and set functions to build bandwidth object. |
| 89 | */ |
Sho SHIMIZU | 260f6ef | 2015-08-11 13:53:31 -0700 | [diff] [blame] | 90 | interface Builder { |
Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +0530 | [diff] [blame] | 91 | |
| 92 | /** |
| 93 | * Builds FEC Unnumbered Adjacency with IPv4 Object. |
| 94 | * |
| 95 | * @return FEC Unnumbered Adjacency with IPv4 Object |
| 96 | * @throws PcepParseException when building FEC IPv4 Unnumbered Adjacency object. |
| 97 | */ |
| 98 | PcepFecObjectIPv4UnnumberedAdjacency build() throws PcepParseException; |
| 99 | |
| 100 | /** |
| 101 | * Returns FEC Unnumbered Adjacency with IPv4 header. |
| 102 | * |
| 103 | * @return FEC Unnumbered Adjacency with IPv4 header |
| 104 | */ |
| 105 | PcepObjectHeader getFecIpv4UnnumberedAdjacencyObjHeader(); |
| 106 | |
| 107 | /** |
| 108 | * Sets FEC Unnumbered Adjacency with IPv4 header and returns its builder. |
| 109 | * |
| 110 | * @param obj FEC Unnumbered Adjacency with IPv4 header |
| 111 | * @return Builder by setting FEC Unnumbered Adjacency with IPv4 header |
| 112 | */ |
| 113 | Builder setFecIpv4UnnumberedAdjacencyObjHeader(PcepObjectHeader obj); |
| 114 | |
| 115 | /** |
| 116 | * Returns Local NodeID of FEC Object. |
| 117 | * |
| 118 | * @return Local NodeID of FEC Object |
| 119 | */ |
| 120 | int getLocalNodeID(); |
| 121 | |
| 122 | /** |
| 123 | * Sets Local NodeID and returns its builder. |
| 124 | * |
| 125 | * @param value Local NodeID |
| 126 | * @return Builder by setting Local NodeID |
| 127 | */ |
| 128 | Builder setLocalNodeID(int value); |
| 129 | |
| 130 | /** |
| 131 | * Returns Local InterfaceID of FEC Object. |
| 132 | * |
| 133 | * @return Local InterfaceID of FEC Object |
| 134 | */ |
| 135 | int getLocalInterfaceID(); |
| 136 | |
| 137 | /** |
| 138 | * Sets Local InterfaceID and returns its builder. |
| 139 | * |
| 140 | * @param value Local InterfaceID |
| 141 | * @return Builder by setting Local InterfaceID |
| 142 | */ |
| 143 | Builder setLocalInterfaceID(int value); |
| 144 | |
| 145 | /** |
| 146 | * Returns Remote NodeID of FEC Object. |
| 147 | * |
| 148 | * @return Remote NodeID of FEC Object |
| 149 | */ |
| 150 | int getRemoteNodeID(); |
| 151 | |
| 152 | /** |
| 153 | * Sets Remote NodeID and returns its builder. |
| 154 | * |
| 155 | * @param value Remote NodeID |
| 156 | * @return Builder by setting Remote NodeID |
| 157 | */ |
| 158 | Builder setRemoteNodeID(int value); |
| 159 | |
| 160 | /** |
| 161 | * Returns Remote InterfaceID of FEC Object. |
| 162 | * |
| 163 | * @return Remote InterfaceID of FEC Object |
| 164 | */ |
| 165 | int getRemoteInterfaceID(); |
| 166 | |
| 167 | /** |
| 168 | * Sets Remote InterfaceID and returns its builder. |
| 169 | * |
| 170 | * @param value Remote InterfaceID |
| 171 | * @return Builder by setting Remote InterfaceID |
| 172 | */ |
| 173 | Builder setRemoteInterfaceID(int value); |
| 174 | |
| 175 | /** |
| 176 | * Sets P flag in FEC object header and returns its builder. |
| 177 | * |
| 178 | * @param value boolean value to set P flag |
| 179 | * @return Builder by setting P flag |
| 180 | */ |
| 181 | Builder setPFlag(boolean value); |
| 182 | |
| 183 | /** |
| 184 | * Sets I flag in FEC object header and returns its builder. |
| 185 | * |
| 186 | * @param value boolean value to set I flag |
| 187 | * @return Builder by setting I flag |
| 188 | */ |
| 189 | Builder setIFlag(boolean value); |
| 190 | } |
| 191 | } |