blob: b8bfe2f3e9024cb63ba77d1023a7068b84138d90 [file] [log] [blame]
Phaneendra Manda1c0061d2015-08-06 12:29:38 +05301/*
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
17package org.onosproject.pcepio.protocol;
18
19import org.jboss.netty.buffer.ChannelBuffer;
20import org.onosproject.pcepio.exceptions.PcepParseException;
21import org.onosproject.pcepio.types.PcepObjectHeader;
22
23/**
24 * Abstraction of an entity providing FEC Object of Type is 2 IPv6 Node ID.
25 */
26public interface PcepFecObjectIPv6 extends PcepFecObject {
27
28 /**
29 * Returns NodeID of FEC Object.
30 *
31 * @return NodeID of FEC Object
32 */
33 byte[] getNodeID();
34
35 /**
36 * Sets NodeID with specified value.
37 *
38 * @param value node id
39 */
40 void setNodeID(byte[] value);
41
42 @Override
43 void print();
44
45 @Override
46 int write(ChannelBuffer bb) throws PcepParseException;
47
48 /**
49 * Builder interface with get and set functions to build FEC object.
50 */
51 public interface Builder {
52
53 /**
54 * Builds FEC Object IPv6.
55 *
56 * @return FEC Object IPv6
57 * @throws PcepParseException while building FEC IPv6 Object.
58 */
59 PcepFecObjectIPv6 build() throws PcepParseException;
60
61 /**
62 * Returns FEC Object IPv6 header.
63 *
64 * @return FEC Object IPv6 header
65 */
66 PcepObjectHeader getFecIpv6ObjHeader();
67
68 /**
69 * Sets FEC Object IPv6 header and returns its builder.
70 *
71 * @param obj FEC Object IPv6 header
72 * @return Builder by setting FEC Object IPv6 header
73 */
74 Builder setFecIpv6ObjHeader(PcepObjectHeader obj);
75
76 /**
77 * Returns NodeID of FEC Object.
78 *
79 * @return NodeID of FEC Object
80 */
81 byte[] getNodeID();
82
83 /**
84 * Sets NodeID and returns its builder.
85 *
86 * @param value node id
87 * @return Builder by setting NodeID
88 */
89 Builder setNodeID(byte[] value);
90
91 /**
92 * Sets P flag in FEC object header and returns its builder.
93 *
94 * @param value boolean value to set P flag
95 * @return Builder by setting P flag
96 */
97 Builder setPFlag(boolean value);
98
99 /**
100 * Sets I flag in FEC object header and returns its builder.
101 *
102 * @param value boolean value to set I flag
103 * @return Builder by setting I flag
104 */
105 Builder setIFlag(boolean value);
106 }
107}