Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +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 | |
| 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 FEC Object of Type is 4 IPv6 Adjacency. |
| 25 | */ |
| 26 | public interface PcepFecObjectIPv6Adjacency extends PcepFecObject { |
| 27 | |
| 28 | /** |
| 29 | * Returns Local IPv6Address of FEC Object. |
| 30 | * |
| 31 | * @return Local IPv6Address of FEC Object |
| 32 | */ |
| 33 | byte[] getLocalIPv6Address(); |
| 34 | |
| 35 | /** |
| 36 | * Sets Local IPv6Address with specified value. |
| 37 | * |
| 38 | * @param value Local IPv6Address |
| 39 | */ |
| 40 | void seLocalIPv6Address(byte[] value); |
| 41 | |
| 42 | /** |
| 43 | * Returns Remote IPv6Address of FEC Object. |
| 44 | * |
| 45 | * @return Remote IPv6Address of FEC Object |
| 46 | */ |
| 47 | byte[] getRemoteIPv6Address(); |
| 48 | |
| 49 | /** |
| 50 | * Sets Remote IPv6Address with specified value. |
| 51 | * |
| 52 | * @param value Remote IPv6Address |
| 53 | */ |
| 54 | void seRemoteIPv6Address(byte[] value); |
| 55 | |
| 56 | @Override |
Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +0530 | [diff] [blame] | 57 | int write(ChannelBuffer bb) throws PcepParseException; |
| 58 | |
| 59 | /** |
| 60 | * Builder interface with get and set functions to build FEC object. |
| 61 | */ |
Sho SHIMIZU | 260f6ef | 2015-08-11 13:53:31 -0700 | [diff] [blame] | 62 | interface Builder { |
Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +0530 | [diff] [blame] | 63 | |
| 64 | /** |
| 65 | * Builds FEC Object IPv6 Adjacency. |
| 66 | * |
| 67 | * @return FEC Object IPv6 Adjacency |
| 68 | * @throws PcepParseException while building FEC IPv6 Adjacency object. |
| 69 | */ |
| 70 | PcepFecObjectIPv6Adjacency build() throws PcepParseException; |
| 71 | |
| 72 | /** |
| 73 | * Returns FEC Object IPv6 Adjacency header. |
| 74 | * |
| 75 | * @return FEC Object IPv6 Adjacency header |
| 76 | */ |
| 77 | PcepObjectHeader getFecIpv6AdjacencyObjHeader(); |
| 78 | |
| 79 | /** |
| 80 | * Sets FEC Object IPv6 Adjacency header and returns its builder. |
| 81 | * |
| 82 | * @param obj FEC Object IPv6 Adjacency header |
| 83 | * @return Builder by setting FEC Object IPv6 Adjacency header |
| 84 | */ |
| 85 | Builder setFecIpv6AdjacencyObjHeader(PcepObjectHeader obj); |
| 86 | |
| 87 | /** |
| 88 | * Returns Local IPv6Address of FEC Object. |
| 89 | * |
| 90 | * @return Local IPv6Address of FEC Object |
| 91 | */ |
| 92 | byte[] getLocalIPv6Address(); |
| 93 | |
| 94 | /** |
| 95 | * Sets Local IPv6Address and returns its builder. |
| 96 | * |
| 97 | * @param value Local IPv6Address |
| 98 | * @return Builder by setting Local IPv6Address |
| 99 | */ |
| 100 | Builder setLocalIPv6Address(byte[] value); |
| 101 | |
| 102 | /** |
| 103 | * Returns Remote IPv6Address of FEC Object. |
| 104 | * |
| 105 | * @return Remote IPv6Address of FEC Object |
| 106 | */ |
| 107 | byte[] getRemoteIPv6Address(); |
| 108 | |
| 109 | /** |
| 110 | * Sets Remote IPv6Address and returns its builder. |
| 111 | * |
| 112 | * @param value Remote IPv6Address |
| 113 | * @return Builder by setting Remote IPv6Address |
| 114 | */ |
| 115 | Builder setRemoteIPv6Address(byte[] value); |
| 116 | |
| 117 | /** |
| 118 | * Sets P flag in FEC object header and returns its builder. |
| 119 | * |
| 120 | * @param value boolean value to set P flag |
| 121 | * @return Builder by setting P flag |
| 122 | */ |
| 123 | Builder setPFlag(boolean value); |
| 124 | |
| 125 | /** |
| 126 | * Sets I flag in FEC object header and returns its builder. |
| 127 | * |
| 128 | * @param value boolean value to set I flag |
| 129 | * @return Builder by setting I flag |
| 130 | */ |
| 131 | Builder setIFlag(boolean value); |
| 132 | } |
| 133 | } |