2 * Copyright 2015 Open Networking Laboratory
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.onosproject.pcepio.protocol;
19 import org.jboss.netty.buffer.ChannelBuffer;
20 import org.onosproject.pcepio.exceptions.PcepParseException;
21 import org.onosproject.pcepio.types.PcepObjectHeader;
24 * Abstraction of an entity providing FEC Object of Type 3 IPv4 Adjacency.
26 public interface PcepFecObjectIPv4Adjacency extends PcepFecObject {
29 * Returns Local IPv4Address of FEC Object.
31 * @return Local IPv4Address of FEC Object
33 int getLocalIPv4Address();
36 * Sets Local IPv4Address with specified value.
38 * @param value Local IPv4Address
40 void seLocalIPv4Address(int value);
43 * Returns Remote IPv4Address of FEC Object.
45 * @return Remote IPv4Address of FEC Object
47 int getRemoteIPv4Address();
50 * Sets Remote IPv4Address with specified value.
52 * @param value Remote IPv4Address
54 void seRemoteIPv4Address(int value);
57 int write(ChannelBuffer bb) throws PcepParseException;
60 * Builder interface with get and set functions to build FEC object.
65 * Builds FEC Object IPv4 Adjacency.
67 * @return FEC Object IPv4 Adjacency
68 * @throws PcepParseException while building FEC IPv4 Adjacency object.
70 PcepFecObjectIPv4Adjacency build() throws PcepParseException;
73 * Returns FEC Object IPv4 Adjacency header.
75 * @return FEC Object IPv4 Adjacency header
77 PcepObjectHeader getFecIpv4AdjacencyObjHeader();
80 * Sets FEC Object IPv4 Adjacency header and returns its builder.
82 * @param obj FEC Object IPv4 Adjacency header
83 * @return Builder by setting FEC Object IPv4 header
85 Builder setFecIpv4AdjacencyObjHeader(PcepObjectHeader obj);
88 * Returns Local IPv4Address of FEC Object.
90 * @return Local IPv4Address of FEC Object
92 int getLocalIPv4Address();
95 * Sets Local IPv4Address and returns its builder.
97 * @param value Local IPv4Address
98 * @return Builder by setting Local IPv4Address
100 Builder seLocalIPv4Address(int value);
103 * Sets Remote IPv4Address with specified value.
105 * @return Remote IPv4 Address
107 int getRemoteIPv4Address();
110 * Sets Remote IPv4Address and returns its builder.
112 * @param value Remote IPv4Address
113 * @return Builder by setting Remote IPv4Address
115 Builder seRemoteIPv4Address(int value);
118 * Sets P flag in FEC object header and returns its builder.
120 * @param value boolean value to set P flag
121 * @return Builder by setting P flag
123 Builder setPFlag(boolean value);
126 * Sets I flag in FEC object header and returns its builder.
128 * @param value boolean value to set I flag
129 * @return Builder by setting I flag
131 Builder setIFlag(boolean value);