blob: cba9a5370eddefd9a1ef8d2b665172ee918329af [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
19/**
20 * Abstraction of an entity which Provides List of PCEP Attributes.
21 */
22import java.util.LinkedList;
23
24import org.jboss.netty.buffer.ChannelBuffer;
25import org.onosproject.pcepio.exceptions.PcepParseException;
26
27public 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 */
36 public int write(ChannelBuffer bb) throws PcepParseException;
37
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 /**
95 * Prints the attributes of AttributeList.
96 */
97
98 public void print();
99
100 /**
101 * Builder interface with get and set functions to build PcepAttribute.
102 */
103 public interface Builder {
104
105 /**
106 * Builds PcepAttribute.
107 *
108 * @return PcepAttribute
109 */
110 PcepAttribute build();
111
112 /**
113 * Returns PcepLspaObject.
114 *
115 * @return LspaObject
116 */
117 PcepLspaObject getLspaObject();
118
119 /**
120 * Returns PcepBandwidthObject.
121 *
122 * @return BandwidthObject
123 */
124 PcepBandwidthObject getBandwidthObject();
125
126 /**
127 * Returns PcepIroObject.
128 *
129 * @return iroObject
130 */
131 PcepIroObject getIroObject();
132
133 /**
134 * Sets the PcepBandwidthObject.
135 *
136 * @param bandwidthObject bandwidth object
137 * @return Builder object for PcepAttrubute
138 */
139 Builder setBandwidthObject(PcepBandwidthObject bandwidthObject);
140
141 /**
142 * Sets the PcepLspaObject.
143 *
144 * @param lspaObject lspa object
145 * @return Builder object for PcepAttrubute
146 */
147 Builder setLspaObject(PcepLspaObject lspaObject);
148
149 /**
150 * Sets the PcepIroObject.
151 *
152 * @param iroObject iro object
153 * @return Builder object for PcepAttrubute
154 */
155 Builder setIroObject(PcepIroObject iroObject);
156
157 /**
158 * Returns PcepMetricObject List.
159 *
160 * @return list of metric objects
161 */
162 LinkedList<PcepMetricObject> getMetricObjectList();
163
164 /**
165 * Sets PcepMetricObject List.
166 *
167 * @param llMetricList list of metric objects
168 * @return Builder object for PcepAttrubute
169 */
170 Builder setMetricObjectList(LinkedList<PcepMetricObject> llMetricList);
171 }
172}