blob: f469f547b90903ebffc1325c35b0f634bf22d052 [file] [log] [blame]
Sho SHIMIZU74361c12015-08-11 12:31:48 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Sho SHIMIZU74361c12015-08-11 12:31:48 -07003 *
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
Sho SHIMIZU74361c12015-08-11 12:31:48 -070019import java.util.LinkedList;
20
21import org.jboss.netty.buffer.ChannelBuffer;
22import org.onosproject.pcepio.exceptions.PcepParseException;
23
Phanendra Manda51fb9c22015-09-01 16:17:41 +053024/**
25 * Abstraction of an entity which Provides List of PCEP Attributes.
26 */
Sho SHIMIZU74361c12015-08-11 12:31:48 -070027public interface PcepAttribute {
28
29 /**
30 * writes lspa , bandwidth , Metriclist and Iro objects to the channel.
31 *
32 * @param bb of type channel buffer.
33 * @return object length index.
34 * @throws PcepParseException while writing objects to channel buffer
35 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -070036 int write(ChannelBuffer bb) throws PcepParseException;
Sho SHIMIZU74361c12015-08-11 12:31:48 -070037
38 /**
39 * Returns PcepLspaObject.
40 *
41 * @return LspaObject
42 */
43 PcepLspaObject getLspaObject();
44
45 /**
46 * Returns PcepBandwidthObject.
47 *
48 * @return BandwidthObject
49 */
50 PcepBandwidthObject getBandwidthObject();
51
52 /**
53 * Returns PcepIroObject.
54 *
55 * @return iroObject
56 */
57 PcepIroObject getIroObject();
58
59 /**
60 * Sets the PcepBandwidthObject.
61 *
62 * @param bandwidthObject bandwidth object
63 */
64 void setBandwidthObject(PcepBandwidthObject bandwidthObject);
65
66 /**
67 * Sets the PcepLspaObject.
68 *
69 * @param lspaObject lspa object
70 */
71 void setLspaObject(PcepLspaObject lspaObject);
72
73 /**
74 * Sets the PcepIroObject.
75 *
76 * @param iroObject iro object
77 */
78 void setIroObject(PcepIroObject iroObject);
79
80 /**
81 * Returns PcepMetricObject List.
82 *
83 * @return list of metric objects
84 */
85 LinkedList<PcepMetricObject> getMetricObjectList();
86
87 /**
88 * Sets PcepMetricObject List.
89 *
90 * @param llMetricList list of metric objects
91 */
92 void setMetricObjectList(LinkedList<PcepMetricObject> llMetricList);
93
94 /**
Sho SHIMIZU74361c12015-08-11 12:31:48 -070095 * Builder interface with get and set functions to build PcepAttribute.
96 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -070097 interface Builder {
Sho SHIMIZU74361c12015-08-11 12:31:48 -070098
99 /**
100 * Builds PcepAttribute.
101 *
102 * @return PcepAttribute
103 */
104 PcepAttribute build();
105
106 /**
107 * Returns PcepLspaObject.
108 *
109 * @return LspaObject
110 */
111 PcepLspaObject getLspaObject();
112
113 /**
114 * Returns PcepBandwidthObject.
115 *
116 * @return BandwidthObject
117 */
118 PcepBandwidthObject getBandwidthObject();
119
120 /**
121 * Returns PcepIroObject.
122 *
123 * @return iroObject
124 */
125 PcepIroObject getIroObject();
126
127 /**
128 * Sets the PcepBandwidthObject.
129 *
130 * @param bandwidthObject bandwidth object
131 * @return Builder object for PcepAttrubute
132 */
133 Builder setBandwidthObject(PcepBandwidthObject bandwidthObject);
134
135 /**
136 * Sets the PcepLspaObject.
137 *
138 * @param lspaObject lspa object
139 * @return Builder object for PcepAttrubute
140 */
141 Builder setLspaObject(PcepLspaObject lspaObject);
142
143 /**
144 * Sets the PcepIroObject.
145 *
146 * @param iroObject iro object
147 * @return Builder object for PcepAttrubute
148 */
149 Builder setIroObject(PcepIroObject iroObject);
150
151 /**
152 * Returns PcepMetricObject List.
153 *
154 * @return list of metric objects
155 */
156 LinkedList<PcepMetricObject> getMetricObjectList();
157
158 /**
159 * Sets PcepMetricObject List.
160 *
161 * @param llMetricList list of metric objects
162 * @return Builder object for PcepAttrubute
163 */
164 Builder setMetricObjectList(LinkedList<PcepMetricObject> llMetricList);
165 }
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -0700166}