Committed by
Gerrit Code Review
Use LF (Line Feed) as line separator
Change-Id: I052ab6da04e418bb6bcb4aa1d3d6648dcfd14f6c
Showing
26 changed files
with
3670 additions
and
3670 deletions
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | - | 16 | + |
17 | -package org.onosproject.pcepio.protocol; | 17 | +package org.onosproject.pcepio.protocol; |
18 | - | 18 | + |
19 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 19 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
20 | - | 20 | + |
21 | -/** | 21 | +/** |
22 | - * Abstraction of an entity Provides PcInitiatedLspRequest for PCEP Initiate message. | 22 | + * Abstraction of an entity Provides PcInitiatedLspRequest for PCEP Initiate message. |
23 | - * Reference : PCE initiated tunnel setup draft-ietf-pce-pce-initiated-lsp-03. | 23 | + * Reference : PCE initiated tunnel setup draft-ietf-pce-pce-initiated-lsp-03. |
24 | - */ | 24 | + */ |
25 | -public interface PcInitiatedLspRequest { | 25 | +public interface PcInitiatedLspRequest { |
26 | - | 26 | + |
27 | - /** | 27 | + /** |
28 | - * Returns object of PcepSrpObject. | 28 | + * Returns object of PcepSrpObject. |
29 | - * | 29 | + * |
30 | - * @return srpObject PCEP SRP object | 30 | + * @return srpObject PCEP SRP object |
31 | - */ | 31 | + */ |
32 | - PcepSrpObject getSrpObject(); | 32 | + PcepSrpObject getSrpObject(); |
33 | - | 33 | + |
34 | - /** | 34 | + /** |
35 | - * Returns object of PcepLspObject. | 35 | + * Returns object of PcepLspObject. |
36 | - * | 36 | + * |
37 | - * @return lspObject PCEP LSP object | 37 | + * @return lspObject PCEP LSP object |
38 | - */ | 38 | + */ |
39 | - PcepLspObject getLspObject(); | 39 | + PcepLspObject getLspObject(); |
40 | - | 40 | + |
41 | - /** | 41 | + /** |
42 | - * Returns object of PcepEndPointsObject. | 42 | + * Returns object of PcepEndPointsObject. |
43 | - * | 43 | + * |
44 | - * @return endPointsObject PCEP EndPoints object | 44 | + * @return endPointsObject PCEP EndPoints object |
45 | - */ | 45 | + */ |
46 | - PcepEndPointsObject getEndPointsObject(); | 46 | + PcepEndPointsObject getEndPointsObject(); |
47 | - | 47 | + |
48 | - /** | 48 | + /** |
49 | - * Returns object of PcepEroObject. | 49 | + * Returns object of PcepEroObject. |
50 | - * | 50 | + * |
51 | - * @return eroObject PCEP ERO object | 51 | + * @return eroObject PCEP ERO object |
52 | - */ | 52 | + */ |
53 | - PcepEroObject getEroObject(); | 53 | + PcepEroObject getEroObject(); |
54 | - | 54 | + |
55 | - /** | 55 | + /** |
56 | - * Returns object of PcepAttribute. | 56 | + * Returns object of PcepAttribute. |
57 | - * | 57 | + * |
58 | - * @return pcepAttribute PCEP Attributes | 58 | + * @return pcepAttribute PCEP Attributes |
59 | - */ | 59 | + */ |
60 | - PcepAttribute getPcepAttribute(); | 60 | + PcepAttribute getPcepAttribute(); |
61 | - | 61 | + |
62 | - /** | 62 | + /** |
63 | - * Sets PcepSrpObject. | 63 | + * Sets PcepSrpObject. |
64 | - * | 64 | + * |
65 | - * @param srpobj PCEP SRP object | 65 | + * @param srpobj PCEP SRP object |
66 | - */ | 66 | + */ |
67 | - void setSrpObject(PcepSrpObject srpobj); | 67 | + void setSrpObject(PcepSrpObject srpobj); |
68 | - | 68 | + |
69 | - /** | 69 | + /** |
70 | - * Sets PcepLspObject. | 70 | + * Sets PcepLspObject. |
71 | - * | 71 | + * |
72 | - * @param lspObject PCEP LSP object | 72 | + * @param lspObject PCEP LSP object |
73 | - */ | 73 | + */ |
74 | - void setLspObject(PcepLspObject lspObject); | 74 | + void setLspObject(PcepLspObject lspObject); |
75 | - | 75 | + |
76 | - /** | 76 | + /** |
77 | - * Sets PcepEndPointsObject. | 77 | + * Sets PcepEndPointsObject. |
78 | - * | 78 | + * |
79 | - * @param endPointsObject PCEP EndPoints object | 79 | + * @param endPointsObject PCEP EndPoints object |
80 | - */ | 80 | + */ |
81 | - void setEndPointsObject(PcepEndPointsObject endPointsObject); | 81 | + void setEndPointsObject(PcepEndPointsObject endPointsObject); |
82 | - | 82 | + |
83 | - /** | 83 | + /** |
84 | - * Sets PcepEroObject. | 84 | + * Sets PcepEroObject. |
85 | - * | 85 | + * |
86 | - * @param eroObject PCEP ERO object | 86 | + * @param eroObject PCEP ERO object |
87 | - */ | 87 | + */ |
88 | - void setEroObject(PcepEroObject eroObject); | 88 | + void setEroObject(PcepEroObject eroObject); |
89 | - | 89 | + |
90 | - /** | 90 | + /** |
91 | - * Sets PcepAttribute. | 91 | + * Sets PcepAttribute. |
92 | - * | 92 | + * |
93 | - * @param pcepAttribute PCEP Attributes | 93 | + * @param pcepAttribute PCEP Attributes |
94 | - */ | 94 | + */ |
95 | - void setPcepAttribute(PcepAttribute pcepAttribute); | 95 | + void setPcepAttribute(PcepAttribute pcepAttribute); |
96 | - | 96 | + |
97 | - /** | 97 | + /** |
98 | - * Prints the attribute of PC-INITIATED LSP INITIATION REQUEST. | 98 | + * Prints the attribute of PC-INITIATED LSP INITIATION REQUEST. |
99 | - */ | 99 | + */ |
100 | - void print(); | 100 | + void print(); |
101 | - | 101 | + |
102 | - /** | 102 | + /** |
103 | - * Builder interface with get and set functions to build PcInitiatedLspRequest. | 103 | + * Builder interface with get and set functions to build PcInitiatedLspRequest. |
104 | - */ | 104 | + */ |
105 | - public interface Builder { | 105 | + public interface Builder { |
106 | - | 106 | + |
107 | - /** | 107 | + /** |
108 | - * Builds PcInitiatedLspRequest. | 108 | + * Builds PcInitiatedLspRequest. |
109 | - * | 109 | + * |
110 | - * @return PcInitiatedLspRequest | 110 | + * @return PcInitiatedLspRequest |
111 | - * @throws PcepParseException when mandatory object is not set | 111 | + * @throws PcepParseException when mandatory object is not set |
112 | - */ | 112 | + */ |
113 | - PcInitiatedLspRequest build() throws PcepParseException; | 113 | + PcInitiatedLspRequest build() throws PcepParseException; |
114 | - | 114 | + |
115 | - /** | 115 | + /** |
116 | - * Returns object of PcepSrpObject. | 116 | + * Returns object of PcepSrpObject. |
117 | - * | 117 | + * |
118 | - * @return srpObject | 118 | + * @return srpObject |
119 | - */ | 119 | + */ |
120 | - PcepSrpObject getSrpObject(); | 120 | + PcepSrpObject getSrpObject(); |
121 | - | 121 | + |
122 | - /** | 122 | + /** |
123 | - * Returns object of PcepLspObject. | 123 | + * Returns object of PcepLspObject. |
124 | - * | 124 | + * |
125 | - * @return lspObject | 125 | + * @return lspObject |
126 | - */ | 126 | + */ |
127 | - PcepLspObject getLspObject(); | 127 | + PcepLspObject getLspObject(); |
128 | - | 128 | + |
129 | - /** | 129 | + /** |
130 | - * Returns object of PcepEndPointsObject. | 130 | + * Returns object of PcepEndPointsObject. |
131 | - * | 131 | + * |
132 | - * @return endPointsObject | 132 | + * @return endPointsObject |
133 | - */ | 133 | + */ |
134 | - PcepEndPointsObject getEndPointsObject(); | 134 | + PcepEndPointsObject getEndPointsObject(); |
135 | - | 135 | + |
136 | - /** | 136 | + /** |
137 | - * Returns object of PcepEroObject. | 137 | + * Returns object of PcepEroObject. |
138 | - * | 138 | + * |
139 | - * @return eroObject | 139 | + * @return eroObject |
140 | - */ | 140 | + */ |
141 | - PcepEroObject getEroObject(); | 141 | + PcepEroObject getEroObject(); |
142 | - | 142 | + |
143 | - /** | 143 | + /** |
144 | - * Returns object of PcepAttribute. | 144 | + * Returns object of PcepAttribute. |
145 | - * | 145 | + * |
146 | - * @return pcepAttribute | 146 | + * @return pcepAttribute |
147 | - */ | 147 | + */ |
148 | - PcepAttribute getPcepAttribute(); | 148 | + PcepAttribute getPcepAttribute(); |
149 | - | 149 | + |
150 | - /** | 150 | + /** |
151 | - * Sets PcepSrpObject. | 151 | + * Sets PcepSrpObject. |
152 | - * | 152 | + * |
153 | - * @param srpobj PCEP SRP Object | 153 | + * @param srpobj PCEP SRP Object |
154 | - * @return builder by setting PcepSrpObject | 154 | + * @return builder by setting PcepSrpObject |
155 | - */ | 155 | + */ |
156 | - Builder setSrpObject(PcepSrpObject srpobj); | 156 | + Builder setSrpObject(PcepSrpObject srpobj); |
157 | - | 157 | + |
158 | - /** | 158 | + /** |
159 | - * Sets PcepLspObject. | 159 | + * Sets PcepLspObject. |
160 | - * | 160 | + * |
161 | - * @param lspObject PCEP LSP Object | 161 | + * @param lspObject PCEP LSP Object |
162 | - * @return builder by setting PcepLspObject | 162 | + * @return builder by setting PcepLspObject |
163 | - */ | 163 | + */ |
164 | - Builder setLspObject(PcepLspObject lspObject); | 164 | + Builder setLspObject(PcepLspObject lspObject); |
165 | - | 165 | + |
166 | - /** | 166 | + /** |
167 | - * Sets PcepEndPointsObject. | 167 | + * Sets PcepEndPointsObject. |
168 | - * | 168 | + * |
169 | - * @param endPointsObject EndPoints Object | 169 | + * @param endPointsObject EndPoints Object |
170 | - * @return builder by setting PcepEndPointsObject | 170 | + * @return builder by setting PcepEndPointsObject |
171 | - */ | 171 | + */ |
172 | - Builder setEndPointsObject(PcepEndPointsObject endPointsObject); | 172 | + Builder setEndPointsObject(PcepEndPointsObject endPointsObject); |
173 | - | 173 | + |
174 | - /** | 174 | + /** |
175 | - * Sets PcepEroObject. | 175 | + * Sets PcepEroObject. |
176 | - * | 176 | + * |
177 | - * @param eroObject PCEP ERO Object | 177 | + * @param eroObject PCEP ERO Object |
178 | - * @return builder by setting PcepEroObject | 178 | + * @return builder by setting PcepEroObject |
179 | - */ | 179 | + */ |
180 | - Builder setEroObject(PcepEroObject eroObject); | 180 | + Builder setEroObject(PcepEroObject eroObject); |
181 | - | 181 | + |
182 | - /** | 182 | + /** |
183 | - * Sets PcepAttribute. | 183 | + * Sets PcepAttribute. |
184 | - * | 184 | + * |
185 | - * @param pcepAttribute PCEP Attributes | 185 | + * @param pcepAttribute PCEP Attributes |
186 | - * @return builder by setting PcepAttribute | 186 | + * @return builder by setting PcepAttribute |
187 | - */ | 187 | + */ |
188 | - Builder setPcepAttribute(PcepAttribute pcepAttribute); | 188 | + Builder setPcepAttribute(PcepAttribute pcepAttribute); |
189 | - } | 189 | + } |
190 | -} | 190 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | - | 16 | + |
17 | -package org.onosproject.pcepio.protocol; | 17 | +package org.onosproject.pcepio.protocol; |
18 | - | 18 | + |
19 | -/** | 19 | +/** |
20 | - * Abstraction of an entity which Provides List of PCEP Attributes. | 20 | + * Abstraction of an entity which Provides List of PCEP Attributes. |
21 | - */ | 21 | + */ |
22 | -import java.util.LinkedList; | 22 | +import java.util.LinkedList; |
23 | - | 23 | + |
24 | -import org.jboss.netty.buffer.ChannelBuffer; | 24 | +import org.jboss.netty.buffer.ChannelBuffer; |
25 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 25 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
26 | - | 26 | + |
27 | -public interface PcepAttribute { | 27 | +public interface PcepAttribute { |
28 | - | 28 | + |
29 | - /** | 29 | + /** |
30 | - * writes lspa , bandwidth , Metriclist and Iro objects to the channel. | 30 | + * writes lspa , bandwidth , Metriclist and Iro objects to the channel. |
31 | - * | 31 | + * |
32 | - * @param bb of type channel buffer. | 32 | + * @param bb of type channel buffer. |
33 | - * @return object length index. | 33 | + * @return object length index. |
34 | - * @throws PcepParseException while writing objects to channel buffer | 34 | + * @throws PcepParseException while writing objects to channel buffer |
35 | - */ | 35 | + */ |
36 | - public int write(ChannelBuffer bb) throws PcepParseException; | 36 | + public int write(ChannelBuffer bb) throws PcepParseException; |
37 | - | 37 | + |
38 | - /** | 38 | + /** |
39 | - * Returns PcepLspaObject. | 39 | + * Returns PcepLspaObject. |
40 | - * | 40 | + * |
41 | - * @return LspaObject | 41 | + * @return LspaObject |
42 | - */ | 42 | + */ |
43 | - PcepLspaObject getLspaObject(); | 43 | + PcepLspaObject getLspaObject(); |
44 | - | 44 | + |
45 | - /** | 45 | + /** |
46 | - * Returns PcepBandwidthObject. | 46 | + * Returns PcepBandwidthObject. |
47 | - * | 47 | + * |
48 | - * @return BandwidthObject | 48 | + * @return BandwidthObject |
49 | - */ | 49 | + */ |
50 | - PcepBandwidthObject getBandwidthObject(); | 50 | + PcepBandwidthObject getBandwidthObject(); |
51 | - | 51 | + |
52 | - /** | 52 | + /** |
53 | - * Returns PcepIroObject. | 53 | + * Returns PcepIroObject. |
54 | - * | 54 | + * |
55 | - * @return iroObject | 55 | + * @return iroObject |
56 | - */ | 56 | + */ |
57 | - PcepIroObject getIroObject(); | 57 | + PcepIroObject getIroObject(); |
58 | - | 58 | + |
59 | - /** | 59 | + /** |
60 | - * Sets the PcepBandwidthObject. | 60 | + * Sets the PcepBandwidthObject. |
61 | - * | 61 | + * |
62 | - * @param bandwidthObject bandwidth object | 62 | + * @param bandwidthObject bandwidth object |
63 | - */ | 63 | + */ |
64 | - void setBandwidthObject(PcepBandwidthObject bandwidthObject); | 64 | + void setBandwidthObject(PcepBandwidthObject bandwidthObject); |
65 | - | 65 | + |
66 | - /** | 66 | + /** |
67 | - * Sets the PcepLspaObject. | 67 | + * Sets the PcepLspaObject. |
68 | - * | 68 | + * |
69 | - * @param lspaObject lspa object | 69 | + * @param lspaObject lspa object |
70 | - */ | 70 | + */ |
71 | - void setLspaObject(PcepLspaObject lspaObject); | 71 | + void setLspaObject(PcepLspaObject lspaObject); |
72 | - | 72 | + |
73 | - /** | 73 | + /** |
74 | - * Sets the PcepIroObject. | 74 | + * Sets the PcepIroObject. |
75 | - * | 75 | + * |
76 | - * @param iroObject iro object | 76 | + * @param iroObject iro object |
77 | - */ | 77 | + */ |
78 | - void setIroObject(PcepIroObject iroObject); | 78 | + void setIroObject(PcepIroObject iroObject); |
79 | - | 79 | + |
80 | - /** | 80 | + /** |
81 | - * Returns PcepMetricObject List. | 81 | + * Returns PcepMetricObject List. |
82 | - * | 82 | + * |
83 | - * @return list of metric objects | 83 | + * @return list of metric objects |
84 | - */ | 84 | + */ |
85 | - LinkedList<PcepMetricObject> getMetricObjectList(); | 85 | + LinkedList<PcepMetricObject> getMetricObjectList(); |
86 | - | 86 | + |
87 | - /** | 87 | + /** |
88 | - * Sets PcepMetricObject List. | 88 | + * Sets PcepMetricObject List. |
89 | - * | 89 | + * |
90 | - * @param llMetricList list of metric objects | 90 | + * @param llMetricList list of metric objects |
91 | - */ | 91 | + */ |
92 | - void setMetricObjectList(LinkedList<PcepMetricObject> llMetricList); | 92 | + void setMetricObjectList(LinkedList<PcepMetricObject> llMetricList); |
93 | - | 93 | + |
94 | - /** | 94 | + /** |
95 | - * Prints the attributes of AttributeList. | 95 | + * Prints the attributes of AttributeList. |
96 | - */ | 96 | + */ |
97 | - | 97 | + |
98 | - public void print(); | 98 | + public void print(); |
99 | - | 99 | + |
100 | - /** | 100 | + /** |
101 | - * Builder interface with get and set functions to build PcepAttribute. | 101 | + * Builder interface with get and set functions to build PcepAttribute. |
102 | - */ | 102 | + */ |
103 | - public interface Builder { | 103 | + public interface Builder { |
104 | - | 104 | + |
105 | - /** | 105 | + /** |
106 | - * Builds PcepAttribute. | 106 | + * Builds PcepAttribute. |
107 | - * | 107 | + * |
108 | - * @return PcepAttribute | 108 | + * @return PcepAttribute |
109 | - */ | 109 | + */ |
110 | - PcepAttribute build(); | 110 | + PcepAttribute build(); |
111 | - | 111 | + |
112 | - /** | 112 | + /** |
113 | - * Returns PcepLspaObject. | 113 | + * Returns PcepLspaObject. |
114 | - * | 114 | + * |
115 | - * @return LspaObject | 115 | + * @return LspaObject |
116 | - */ | 116 | + */ |
117 | - PcepLspaObject getLspaObject(); | 117 | + PcepLspaObject getLspaObject(); |
118 | - | 118 | + |
119 | - /** | 119 | + /** |
120 | - * Returns PcepBandwidthObject. | 120 | + * Returns PcepBandwidthObject. |
121 | - * | 121 | + * |
122 | - * @return BandwidthObject | 122 | + * @return BandwidthObject |
123 | - */ | 123 | + */ |
124 | - PcepBandwidthObject getBandwidthObject(); | 124 | + PcepBandwidthObject getBandwidthObject(); |
125 | - | 125 | + |
126 | - /** | 126 | + /** |
127 | - * Returns PcepIroObject. | 127 | + * Returns PcepIroObject. |
128 | - * | 128 | + * |
129 | - * @return iroObject | 129 | + * @return iroObject |
130 | - */ | 130 | + */ |
131 | - PcepIroObject getIroObject(); | 131 | + PcepIroObject getIroObject(); |
132 | - | 132 | + |
133 | - /** | 133 | + /** |
134 | - * Sets the PcepBandwidthObject. | 134 | + * Sets the PcepBandwidthObject. |
135 | - * | 135 | + * |
136 | - * @param bandwidthObject bandwidth object | 136 | + * @param bandwidthObject bandwidth object |
137 | - * @return Builder object for PcepAttrubute | 137 | + * @return Builder object for PcepAttrubute |
138 | - */ | 138 | + */ |
139 | - Builder setBandwidthObject(PcepBandwidthObject bandwidthObject); | 139 | + Builder setBandwidthObject(PcepBandwidthObject bandwidthObject); |
140 | - | 140 | + |
141 | - /** | 141 | + /** |
142 | - * Sets the PcepLspaObject. | 142 | + * Sets the PcepLspaObject. |
143 | - * | 143 | + * |
144 | - * @param lspaObject lspa object | 144 | + * @param lspaObject lspa object |
145 | - * @return Builder object for PcepAttrubute | 145 | + * @return Builder object for PcepAttrubute |
146 | - */ | 146 | + */ |
147 | - Builder setLspaObject(PcepLspaObject lspaObject); | 147 | + Builder setLspaObject(PcepLspaObject lspaObject); |
148 | - | 148 | + |
149 | - /** | 149 | + /** |
150 | - * Sets the PcepIroObject. | 150 | + * Sets the PcepIroObject. |
151 | - * | 151 | + * |
152 | - * @param iroObject iro object | 152 | + * @param iroObject iro object |
153 | - * @return Builder object for PcepAttrubute | 153 | + * @return Builder object for PcepAttrubute |
154 | - */ | 154 | + */ |
155 | - Builder setIroObject(PcepIroObject iroObject); | 155 | + Builder setIroObject(PcepIroObject iroObject); |
156 | - | 156 | + |
157 | - /** | 157 | + /** |
158 | - * Returns PcepMetricObject List. | 158 | + * Returns PcepMetricObject List. |
159 | - * | 159 | + * |
160 | - * @return list of metric objects | 160 | + * @return list of metric objects |
161 | - */ | 161 | + */ |
162 | - LinkedList<PcepMetricObject> getMetricObjectList(); | 162 | + LinkedList<PcepMetricObject> getMetricObjectList(); |
163 | - | 163 | + |
164 | - /** | 164 | + /** |
165 | - * Sets PcepMetricObject List. | 165 | + * Sets PcepMetricObject List. |
166 | - * | 166 | + * |
167 | - * @param llMetricList list of metric objects | 167 | + * @param llMetricList list of metric objects |
168 | - * @return Builder object for PcepAttrubute | 168 | + * @return Builder object for PcepAttrubute |
169 | - */ | 169 | + */ |
170 | - Builder setMetricObjectList(LinkedList<PcepMetricObject> llMetricList); | 170 | + Builder setMetricObjectList(LinkedList<PcepMetricObject> llMetricList); |
171 | - } | 171 | + } |
172 | } | 172 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import org.jboss.netty.buffer.ChannelBuffer; | 18 | +import org.jboss.netty.buffer.ChannelBuffer; |
19 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 19 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
20 | -import org.onosproject.pcepio.types.PcepObjectHeader; | 20 | +import org.onosproject.pcepio.types.PcepObjectHeader; |
21 | - | 21 | + |
22 | -/** | 22 | +/** |
23 | - * Abstraction of an entity providing PCEP Bandwidth Object. | 23 | + * Abstraction of an entity providing PCEP Bandwidth Object. |
24 | - */ | 24 | + */ |
25 | -public interface PcepBandwidthObject { | 25 | +public interface PcepBandwidthObject { |
26 | - | 26 | + |
27 | - /** | 27 | + /** |
28 | - * Returns bandwidth value. | 28 | + * Returns bandwidth value. |
29 | - * | 29 | + * |
30 | - * @return bandwidth value | 30 | + * @return bandwidth value |
31 | - */ | 31 | + */ |
32 | - int getBandwidth(); | 32 | + int getBandwidth(); |
33 | - | 33 | + |
34 | - /** | 34 | + /** |
35 | - * Sets bandwidth with specified value. | 35 | + * Sets bandwidth with specified value. |
36 | - * | 36 | + * |
37 | - * @param iBandwidth Bandwidth's value | 37 | + * @param iBandwidth Bandwidth's value |
38 | - */ | 38 | + */ |
39 | - void setBandwidth(int iBandwidth); | 39 | + void setBandwidth(int iBandwidth); |
40 | - | 40 | + |
41 | - /** | 41 | + /** |
42 | - * Prints attributes of bandwidth object. | 42 | + * Prints attributes of bandwidth object. |
43 | - */ | 43 | + */ |
44 | - void print(); | 44 | + void print(); |
45 | - | 45 | + |
46 | - /** | 46 | + /** |
47 | - * Writes the BandwidthObject into channel buffer. | 47 | + * Writes the BandwidthObject into channel buffer. |
48 | - * | 48 | + * |
49 | - * @param bb channel buffer | 49 | + * @param bb channel buffer |
50 | - * @return Returns the writerIndex of this buffer | 50 | + * @return Returns the writerIndex of this buffer |
51 | - * @throws PcepParseException if bandwidth object header fails to write in channel buffer | 51 | + * @throws PcepParseException if bandwidth object header fails to write in channel buffer |
52 | - */ | 52 | + */ |
53 | - public int write(ChannelBuffer bb) throws PcepParseException; | 53 | + public int write(ChannelBuffer bb) throws PcepParseException; |
54 | - | 54 | + |
55 | - /** | 55 | + /** |
56 | - * Builder interface with get and set functions to build bandwidth object. | 56 | + * Builder interface with get and set functions to build bandwidth object. |
57 | - */ | 57 | + */ |
58 | - public interface Builder { | 58 | + public interface Builder { |
59 | - | 59 | + |
60 | - /** | 60 | + /** |
61 | - * Builds BandwidthObject. | 61 | + * Builds BandwidthObject. |
62 | - * | 62 | + * |
63 | - * @return BandwidthObject | 63 | + * @return BandwidthObject |
64 | - * @throws PcepParseException if build fails while creating PcepBandwidthObject | 64 | + * @throws PcepParseException if build fails while creating PcepBandwidthObject |
65 | - */ | 65 | + */ |
66 | - PcepBandwidthObject build() throws PcepParseException; | 66 | + PcepBandwidthObject build() throws PcepParseException; |
67 | - | 67 | + |
68 | - /** | 68 | + /** |
69 | - * Returns bandwidth object header. | 69 | + * Returns bandwidth object header. |
70 | - * | 70 | + * |
71 | - * @return bandwidth object header | 71 | + * @return bandwidth object header |
72 | - */ | 72 | + */ |
73 | - PcepObjectHeader getBandwidthObjHeader(); | 73 | + PcepObjectHeader getBandwidthObjHeader(); |
74 | - | 74 | + |
75 | - /** | 75 | + /** |
76 | - * Sets bandwidth object header and returns its builder. | 76 | + * Sets bandwidth object header and returns its builder. |
77 | - * | 77 | + * |
78 | - * @param obj Bandwidth object header | 78 | + * @param obj Bandwidth object header |
79 | - * @return Builder by setting Bandwidth object header | 79 | + * @return Builder by setting Bandwidth object header |
80 | - */ | 80 | + */ |
81 | - Builder setBandwidthObjHeader(PcepObjectHeader obj); | 81 | + Builder setBandwidthObjHeader(PcepObjectHeader obj); |
82 | - | 82 | + |
83 | - /** | 83 | + /** |
84 | - * Returns bandwidth value. | 84 | + * Returns bandwidth value. |
85 | - * | 85 | + * |
86 | - * @return bandwidth | 86 | + * @return bandwidth |
87 | - */ | 87 | + */ |
88 | - int getBandwidth(); | 88 | + int getBandwidth(); |
89 | - | 89 | + |
90 | - /** | 90 | + /** |
91 | - * Sets bandwidth value and return its builder. | 91 | + * Sets bandwidth value and return its builder. |
92 | - * | 92 | + * |
93 | - * @param iBandwidth bandwidth value | 93 | + * @param iBandwidth bandwidth value |
94 | - * @return Builder by setting bandwidth | 94 | + * @return Builder by setting bandwidth |
95 | - */ | 95 | + */ |
96 | - Builder setBandwidth(int iBandwidth); | 96 | + Builder setBandwidth(int iBandwidth); |
97 | - | 97 | + |
98 | - /** | 98 | + /** |
99 | - * Sets P flag in Bandwidth object header and returns its builder. | 99 | + * Sets P flag in Bandwidth object header and returns its builder. |
100 | - * | 100 | + * |
101 | - * @param value boolean value to set P flag | 101 | + * @param value boolean value to set P flag |
102 | - * @return Builder by setting P flag | 102 | + * @return Builder by setting P flag |
103 | - */ | 103 | + */ |
104 | - Builder setPFlag(boolean value); | 104 | + Builder setPFlag(boolean value); |
105 | - | 105 | + |
106 | - /** | 106 | + /** |
107 | - * Sets I flag in Bandwidth object header and returns its builder. | 107 | + * Sets I flag in Bandwidth object header and returns its builder. |
108 | - * | 108 | + * |
109 | - * @param value boolean value to set I flag | 109 | + * @param value boolean value to set I flag |
110 | - * @return Builder by setting I flag | 110 | + * @return Builder by setting I flag |
111 | - */ | 111 | + */ |
112 | - Builder setIFlag(boolean value); | 112 | + Builder setIFlag(boolean value); |
113 | - } | 113 | + } |
114 | -} | 114 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | - | 16 | + |
17 | -package org.onosproject.pcepio.protocol; | 17 | +package org.onosproject.pcepio.protocol; |
18 | - | 18 | + |
19 | -import java.util.LinkedList; | 19 | +import java.util.LinkedList; |
20 | - | 20 | + |
21 | -import org.jboss.netty.buffer.ChannelBuffer; | 21 | +import org.jboss.netty.buffer.ChannelBuffer; |
22 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 22 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
23 | -import org.onosproject.pcepio.types.PcepObjectHeader; | 23 | +import org.onosproject.pcepio.types.PcepObjectHeader; |
24 | -import org.onosproject.pcepio.types.PcepValueType; | 24 | +import org.onosproject.pcepio.types.PcepValueType; |
25 | - | 25 | + |
26 | -/** | 26 | +/** |
27 | - * Abstraction of an entity providing PCEP ERO Object. | 27 | + * Abstraction of an entity providing PCEP ERO Object. |
28 | - */ | 28 | + */ |
29 | -public interface PcepEroObject { | 29 | +public interface PcepEroObject { |
30 | - | 30 | + |
31 | - /** | 31 | + /** |
32 | - * Return LinkedList of SubObjects of ERO Object. | 32 | + * Return LinkedList of SubObjects of ERO Object. |
33 | - * | 33 | + * |
34 | - * @return list of subobjects | 34 | + * @return list of subobjects |
35 | - */ | 35 | + */ |
36 | - LinkedList<PcepValueType> getSubObjects(); | 36 | + LinkedList<PcepValueType> getSubObjects(); |
37 | - | 37 | + |
38 | - /** | 38 | + /** |
39 | - * Sets LinkedList of SubObjects in ERO Object. | 39 | + * Sets LinkedList of SubObjects in ERO Object. |
40 | - * | 40 | + * |
41 | - * @param llSubObjects list of subobjects | 41 | + * @param llSubObjects list of subobjects |
42 | - */ | 42 | + */ |
43 | - void setSubObjects(LinkedList<PcepValueType> llSubObjects); | 43 | + void setSubObjects(LinkedList<PcepValueType> llSubObjects); |
44 | - | 44 | + |
45 | - /** | 45 | + /** |
46 | - * Writes the ERO Object into channel buffer. | 46 | + * Writes the ERO Object into channel buffer. |
47 | - * | 47 | + * |
48 | - * @param bb channel buffer | 48 | + * @param bb channel buffer |
49 | - * @return Returns the writerIndex of this buffer | 49 | + * @return Returns the writerIndex of this buffer |
50 | - * @throws PcepParseException while writing ERO Object into ChannelBuffer | 50 | + * @throws PcepParseException while writing ERO Object into ChannelBuffer |
51 | - */ | 51 | + */ |
52 | - public int write(ChannelBuffer bb) throws PcepParseException; | 52 | + public int write(ChannelBuffer bb) throws PcepParseException; |
53 | - | 53 | + |
54 | - /** | 54 | + /** |
55 | - * Prints attributes of ERO object. | 55 | + * Prints attributes of ERO object. |
56 | - */ | 56 | + */ |
57 | - void print(); | 57 | + void print(); |
58 | - | 58 | + |
59 | - /** | 59 | + /** |
60 | - * Builder interface with get and set functions to build ERO object. | 60 | + * Builder interface with get and set functions to build ERO object. |
61 | - */ | 61 | + */ |
62 | - public interface Builder { | 62 | + public interface Builder { |
63 | - | 63 | + |
64 | - /** | 64 | + /** |
65 | - * Builds ERO Object. | 65 | + * Builds ERO Object. |
66 | - * | 66 | + * |
67 | - * @return ERO Object | 67 | + * @return ERO Object |
68 | - */ | 68 | + */ |
69 | - PcepEroObject build(); | 69 | + PcepEroObject build(); |
70 | - | 70 | + |
71 | - /** | 71 | + /** |
72 | - * Returns ERO Object Header. | 72 | + * Returns ERO Object Header. |
73 | - * | 73 | + * |
74 | - * @return ERO Object Header | 74 | + * @return ERO Object Header |
75 | - */ | 75 | + */ |
76 | - PcepObjectHeader getEroObjHeader(); | 76 | + PcepObjectHeader getEroObjHeader(); |
77 | - | 77 | + |
78 | - /** | 78 | + /** |
79 | - * Sets ERO Object header and returns its builder. | 79 | + * Sets ERO Object header and returns its builder. |
80 | - * | 80 | + * |
81 | - * @param obj ERO Object header | 81 | + * @param obj ERO Object header |
82 | - * @return Builder by setting ERO Object header | 82 | + * @return Builder by setting ERO Object header |
83 | - */ | 83 | + */ |
84 | - Builder setEroObjHeader(PcepObjectHeader obj); | 84 | + Builder setEroObjHeader(PcepObjectHeader obj); |
85 | - | 85 | + |
86 | - /** | 86 | + /** |
87 | - * Returns LinkedList of SubObjects in ERO Objects. | 87 | + * Returns LinkedList of SubObjects in ERO Objects. |
88 | - * | 88 | + * |
89 | - * @return list of subobjects | 89 | + * @return list of subobjects |
90 | - */ | 90 | + */ |
91 | - LinkedList<PcepValueType> getSubObjects(); | 91 | + LinkedList<PcepValueType> getSubObjects(); |
92 | - | 92 | + |
93 | - /** | 93 | + /** |
94 | - * Sets LinkedList of SubObjects and returns its builder. | 94 | + * Sets LinkedList of SubObjects and returns its builder. |
95 | - * | 95 | + * |
96 | - * @param llSubObjects list of SubObjects | 96 | + * @param llSubObjects list of SubObjects |
97 | - * @return Builder by setting list of SubObjects | 97 | + * @return Builder by setting list of SubObjects |
98 | - */ | 98 | + */ |
99 | - Builder setSubObjects(LinkedList<PcepValueType> llSubObjects); | 99 | + Builder setSubObjects(LinkedList<PcepValueType> llSubObjects); |
100 | - | 100 | + |
101 | - /** | 101 | + /** |
102 | - * Sets P flag in ERO object header and returns its builder. | 102 | + * Sets P flag in ERO object header and returns its builder. |
103 | - * | 103 | + * |
104 | - * @param value boolean value to set P flag | 104 | + * @param value boolean value to set P flag |
105 | - * @return Builder by setting P flag | 105 | + * @return Builder by setting P flag |
106 | - */ | 106 | + */ |
107 | - Builder setPFlag(boolean value); | 107 | + Builder setPFlag(boolean value); |
108 | - | 108 | + |
109 | - /** | 109 | + /** |
110 | - * Sets I flag in ERO object header and returns its builder. | 110 | + * Sets I flag in ERO object header and returns its builder. |
111 | - * | 111 | + * |
112 | - * @param value boolean value to set I flag | 112 | + * @param value boolean value to set I flag |
113 | - * @return Builder by setting I flag | 113 | + * @return Builder by setting I flag |
114 | - */ | 114 | + */ |
115 | - Builder setIFlag(boolean value); | 115 | + Builder setIFlag(boolean value); |
116 | - } | 116 | + } |
117 | } | 117 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import java.util.LinkedList; | 18 | +import java.util.LinkedList; |
19 | - | 19 | + |
20 | -import org.jboss.netty.buffer.ChannelBuffer; | 20 | +import org.jboss.netty.buffer.ChannelBuffer; |
21 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 21 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
22 | - | 22 | + |
23 | -/** | 23 | +/** |
24 | - * Abstraction of an entity which provides PCEP error for PCEP error message. | 24 | + * Abstraction of an entity which provides PCEP error for PCEP error message. |
25 | - */ | 25 | + */ |
26 | -public interface PcepError { | 26 | +public interface PcepError { |
27 | - | 27 | + |
28 | - /** | 28 | + /** |
29 | - * Returns the PcepRPObject List. | 29 | + * Returns the PcepRPObject List. |
30 | - * | 30 | + * |
31 | - * @return list of type PcepRPObject | 31 | + * @return list of type PcepRPObject |
32 | - */ | 32 | + */ |
33 | - LinkedList<PcepRPObject> getRPObjList(); | 33 | + LinkedList<PcepRPObject> getRPObjList(); |
34 | - | 34 | + |
35 | - /** | 35 | + /** |
36 | - * Sets the RP Objects lists. | 36 | + * Sets the RP Objects lists. |
37 | - * | 37 | + * |
38 | - * @param llRPObjList list of type PcepRPObject | 38 | + * @param llRPObjList list of type PcepRPObject |
39 | - */ | 39 | + */ |
40 | - void setRPObjList(LinkedList<PcepRPObject> llRPObjList); | 40 | + void setRPObjList(LinkedList<PcepRPObject> llRPObjList); |
41 | - | 41 | + |
42 | - /** | 42 | + /** |
43 | - * Returns the PcepTEObject List. | 43 | + * Returns the PcepTEObject List. |
44 | - * | 44 | + * |
45 | - * @return list of type PcepTEObject | 45 | + * @return list of type PcepTEObject |
46 | - */ | 46 | + */ |
47 | - LinkedList<PcepTEObject> getTEObjList(); | 47 | + LinkedList<PcepTEObject> getTEObjList(); |
48 | - | 48 | + |
49 | - /** | 49 | + /** |
50 | - * Sets the TE Objects lists. | 50 | + * Sets the TE Objects lists. |
51 | - * | 51 | + * |
52 | - * @param llTEObjList list of type PcepTEObject | 52 | + * @param llTEObjList list of type PcepTEObject |
53 | - */ | 53 | + */ |
54 | - void setTEObjList(LinkedList<PcepTEObject> llTEObjList); | 54 | + void setTEObjList(LinkedList<PcepTEObject> llTEObjList); |
55 | - | 55 | + |
56 | - /** | 56 | + /** |
57 | - * Returns the PcepErrorObject. | 57 | + * Returns the PcepErrorObject. |
58 | - * | 58 | + * |
59 | - * @return list of type PcepErrorObject | 59 | + * @return list of type PcepErrorObject |
60 | - */ | 60 | + */ |
61 | - LinkedList<PcepErrorObject> getErrorObjList(); | 61 | + LinkedList<PcepErrorObject> getErrorObjList(); |
62 | - | 62 | + |
63 | - /** | 63 | + /** |
64 | - * Sets the Error Objects lists. | 64 | + * Sets the Error Objects lists. |
65 | - * | 65 | + * |
66 | - * @param llErrorObjList list of type PcepErrorObject | 66 | + * @param llErrorObjList list of type PcepErrorObject |
67 | - */ | 67 | + */ |
68 | - public void setErrorObjList(LinkedList<PcepErrorObject> llErrorObjList); | 68 | + public void setErrorObjList(LinkedList<PcepErrorObject> llErrorObjList); |
69 | - | 69 | + |
70 | - /** | 70 | + /** |
71 | - * Writes the byte stream of PCEP error to the channel buffer. | 71 | + * Writes the byte stream of PCEP error to the channel buffer. |
72 | - * | 72 | + * |
73 | - * @param bb of type channel buffer | 73 | + * @param bb of type channel buffer |
74 | - * @return object length index | 74 | + * @return object length index |
75 | - * @throws PcepParseException while writing Error part into ChannelBuffer | 75 | + * @throws PcepParseException while writing Error part into ChannelBuffer |
76 | - */ | 76 | + */ |
77 | - public int write(ChannelBuffer bb) throws PcepParseException; | 77 | + public int write(ChannelBuffer bb) throws PcepParseException; |
78 | - | 78 | + |
79 | - /** | 79 | + /** |
80 | - * Prints the attributes of PCEP Error. | 80 | + * Prints the attributes of PCEP Error. |
81 | - */ | 81 | + */ |
82 | - public void print(); | 82 | + public void print(); |
83 | - | 83 | + |
84 | - /** | 84 | + /** |
85 | - * Builder interface with get and set functions to build PcepError. | 85 | + * Builder interface with get and set functions to build PcepError. |
86 | - */ | 86 | + */ |
87 | - public interface Builder { | 87 | + public interface Builder { |
88 | - | 88 | + |
89 | - /** | 89 | + /** |
90 | - * Builds PcepError Object. | 90 | + * Builds PcepError Object. |
91 | - * | 91 | + * |
92 | - * @return PcepError Object | 92 | + * @return PcepError Object |
93 | - */ | 93 | + */ |
94 | - PcepError build(); | 94 | + PcepError build(); |
95 | - | 95 | + |
96 | - /** | 96 | + /** |
97 | - * Returns the PcepRPObject. | 97 | + * Returns the PcepRPObject. |
98 | - * | 98 | + * |
99 | - * @return list of type PcepRPObject | 99 | + * @return list of type PcepRPObject |
100 | - */ | 100 | + */ |
101 | - LinkedList<PcepRPObject> getRPObjList(); | 101 | + LinkedList<PcepRPObject> getRPObjList(); |
102 | - | 102 | + |
103 | - /** | 103 | + /** |
104 | - * Sets RP Object lists and returns its builder. | 104 | + * Sets RP Object lists and returns its builder. |
105 | - * | 105 | + * |
106 | - * @param llRPObjList list of type PcepRpObject | 106 | + * @param llRPObjList list of type PcepRpObject |
107 | - * @return builder by setting Linked list of RP Object | 107 | + * @return builder by setting Linked list of RP Object |
108 | - */ | 108 | + */ |
109 | - Builder setRPObjList(LinkedList<PcepRPObject> llRPObjList); | 109 | + Builder setRPObjList(LinkedList<PcepRPObject> llRPObjList); |
110 | - | 110 | + |
111 | - /** | 111 | + /** |
112 | - * Returns the PcepTEObject. | 112 | + * Returns the PcepTEObject. |
113 | - * | 113 | + * |
114 | - * @return llTEObjList of type PcepTEObject | 114 | + * @return llTEObjList of type PcepTEObject |
115 | - */ | 115 | + */ |
116 | - LinkedList<PcepTEObject> getTEObjList(); | 116 | + LinkedList<PcepTEObject> getTEObjList(); |
117 | - | 117 | + |
118 | - /** | 118 | + /** |
119 | - * Sets TE Object lists and returns its builder. | 119 | + * Sets TE Object lists and returns its builder. |
120 | - * | 120 | + * |
121 | - * @param llTEObjList list of type PcepTEObject | 121 | + * @param llTEObjList list of type PcepTEObject |
122 | - * @return builder by setting list of type PcepTEObject | 122 | + * @return builder by setting list of type PcepTEObject |
123 | - */ | 123 | + */ |
124 | - Builder setTEObjList(LinkedList<PcepTEObject> llTEObjList); | 124 | + Builder setTEObjList(LinkedList<PcepTEObject> llTEObjList); |
125 | - | 125 | + |
126 | - /** | 126 | + /** |
127 | - * Returns the PcepErrorObject. | 127 | + * Returns the PcepErrorObject. |
128 | - * | 128 | + * |
129 | - * @return list of type PcepErrorObject | 129 | + * @return list of type PcepErrorObject |
130 | - */ | 130 | + */ |
131 | - LinkedList<PcepErrorObject> getErrorObjList(); | 131 | + LinkedList<PcepErrorObject> getErrorObjList(); |
132 | - | 132 | + |
133 | - /** | 133 | + /** |
134 | - * Sets Error Object lists and returns its builder. | 134 | + * Sets Error Object lists and returns its builder. |
135 | - * | 135 | + * |
136 | - * @param llErrorObjList list of type PcepErrorObject | 136 | + * @param llErrorObjList list of type PcepErrorObject |
137 | - * @return builder by setting list of type PcepErrorObject | 137 | + * @return builder by setting list of type PcepErrorObject |
138 | - */ | 138 | + */ |
139 | - Builder setErrorObjList(LinkedList<PcepErrorObject> llErrorObjList); | 139 | + Builder setErrorObjList(LinkedList<PcepErrorObject> llErrorObjList); |
140 | - } | 140 | + } |
141 | -} | 141 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import java.util.LinkedList; | 18 | +import java.util.LinkedList; |
19 | - | 19 | + |
20 | -import org.jboss.netty.buffer.ChannelBuffer; | 20 | +import org.jboss.netty.buffer.ChannelBuffer; |
21 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 21 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
22 | - | 22 | + |
23 | -/** | 23 | +/** |
24 | - * Abstraction of an entity which provides PCEP Error Info. | 24 | + * Abstraction of an entity which provides PCEP Error Info. |
25 | - * Reference :PCEP Extension for Transporting TE Data draft-dhodylee-pce-pcep-te-data-extn-02. | 25 | + * Reference :PCEP Extension for Transporting TE Data draft-dhodylee-pce-pcep-te-data-extn-02. |
26 | - */ | 26 | + */ |
27 | -public interface PcepErrorInfo { | 27 | +public interface PcepErrorInfo { |
28 | - | 28 | + |
29 | - /** | 29 | + /** |
30 | - * Returns whether error info list is present or not. | 30 | + * Returns whether error info list is present or not. |
31 | - * | 31 | + * |
32 | - * @return true if error info present, false otherwise | 32 | + * @return true if error info present, false otherwise |
33 | - */ | 33 | + */ |
34 | - public boolean isErrorInfoPresent(); | 34 | + public boolean isErrorInfoPresent(); |
35 | - | 35 | + |
36 | - /** | 36 | + /** |
37 | - * Reads from channel buffer for TE and RP objects. | 37 | + * Reads from channel buffer for TE and RP objects. |
38 | - * | 38 | + * |
39 | - * @param bb of channel buffer | 39 | + * @param bb of channel buffer |
40 | - * @throws PcepParseException while parsing Error info part. | 40 | + * @throws PcepParseException while parsing Error info part. |
41 | - */ | 41 | + */ |
42 | - public void read(ChannelBuffer bb) throws PcepParseException; | 42 | + public void read(ChannelBuffer bb) throws PcepParseException; |
43 | - | 43 | + |
44 | - /** | 44 | + /** |
45 | - * Writes byte stream of PCEP error info to channel buffer. | 45 | + * Writes byte stream of PCEP error info to channel buffer. |
46 | - * | 46 | + * |
47 | - * @param bb of type channel buffer | 47 | + * @param bb of type channel buffer |
48 | - * @throws PcepParseException while writing Error info part into Channel Buffer. | 48 | + * @throws PcepParseException while writing Error info part into Channel Buffer. |
49 | - */ | 49 | + */ |
50 | - public void write(ChannelBuffer bb) throws PcepParseException; | 50 | + public void write(ChannelBuffer bb) throws PcepParseException; |
51 | - | 51 | + |
52 | - /** | 52 | + /** |
53 | - * Prints the attributes of error info list. | 53 | + * Prints the attributes of error info list. |
54 | - */ | 54 | + */ |
55 | - public void print(); | 55 | + public void print(); |
56 | - | 56 | + |
57 | - /** | 57 | + /** |
58 | - * Returns Error Value in PCEP-ERROR Object. | 58 | + * Returns Error Value in PCEP-ERROR Object. |
59 | - * | 59 | + * |
60 | - * @return list of Error Value in PCEP-ERROR Object | 60 | + * @return list of Error Value in PCEP-ERROR Object |
61 | - */ | 61 | + */ |
62 | - public LinkedList<Integer> getErrorValue(); | 62 | + public LinkedList<Integer> getErrorValue(); |
63 | - | 63 | + |
64 | - /** | 64 | + /** |
65 | - * Returns Error Type in PCEP-ERROR Object. | 65 | + * Returns Error Type in PCEP-ERROR Object. |
66 | - * | 66 | + * |
67 | - * @return list of Error Type in PCEP-ERROR Object | 67 | + * @return list of Error Type in PCEP-ERROR Object |
68 | - */ | 68 | + */ |
69 | - public LinkedList<Integer> getErrorType(); | 69 | + public LinkedList<Integer> getErrorType(); |
70 | - | 70 | + |
71 | - /** | 71 | + /** |
72 | - * Builder interface with get and set functions to build ErrorInfo. | 72 | + * Builder interface with get and set functions to build ErrorInfo. |
73 | - */ | 73 | + */ |
74 | - public interface Builder { | 74 | + public interface Builder { |
75 | - | 75 | + |
76 | - /** | 76 | + /** |
77 | - * Builds ErrorInfo Object. | 77 | + * Builds ErrorInfo Object. |
78 | - * | 78 | + * |
79 | - * @return ErrorInfo Object. | 79 | + * @return ErrorInfo Object. |
80 | - */ | 80 | + */ |
81 | - PcepErrorInfo build(); | 81 | + PcepErrorInfo build(); |
82 | - | 82 | + |
83 | - /** | 83 | + /** |
84 | - * Returns list of PcepError. | 84 | + * Returns list of PcepError. |
85 | - * | 85 | + * |
86 | - * @return list of PcepError | 86 | + * @return list of PcepError |
87 | - */ | 87 | + */ |
88 | - LinkedList<PcepError> getPcepErrorList(); | 88 | + LinkedList<PcepError> getPcepErrorList(); |
89 | - | 89 | + |
90 | - /** | 90 | + /** |
91 | - * Sets PcepError lists and returns its builder. | 91 | + * Sets PcepError lists and returns its builder. |
92 | - * | 92 | + * |
93 | - * @param llPcepErrorList list of PcepError | 93 | + * @param llPcepErrorList list of PcepError |
94 | - * @return builder by setting list of PcepError. | 94 | + * @return builder by setting list of PcepError. |
95 | - */ | 95 | + */ |
96 | - Builder setPcepErrorList(LinkedList<PcepError> llPcepErrorList); | 96 | + Builder setPcepErrorList(LinkedList<PcepError> llPcepErrorList); |
97 | - } | 97 | + } |
98 | -} | 98 | +} | ... | ... |
1 | -package org.onosproject.pcepio.protocol; | 1 | +package org.onosproject.pcepio.protocol; |
2 | - | 2 | + |
3 | -import org.jboss.netty.buffer.ChannelBuffer; | 3 | +import org.jboss.netty.buffer.ChannelBuffer; |
4 | -import org.onosproject.pcepio.types.ErrorObjListWithOpen; | 4 | +import org.onosproject.pcepio.types.ErrorObjListWithOpen; |
5 | - | 5 | + |
6 | -/** | 6 | +/** |
7 | - * Abstraction of an entity providing PCEP Error Message. | 7 | + * Abstraction of an entity providing PCEP Error Message. |
8 | - */ | 8 | + */ |
9 | -public interface PcepErrorMsg extends PcepMessage { | 9 | +public interface PcepErrorMsg extends PcepMessage { |
10 | - | 10 | + |
11 | - @Override | 11 | + @Override |
12 | - PcepVersion getVersion(); | 12 | + PcepVersion getVersion(); |
13 | - | 13 | + |
14 | - @Override | 14 | + @Override |
15 | - PcepType getType(); | 15 | + PcepType getType(); |
16 | - | 16 | + |
17 | - /** | 17 | + /** |
18 | - * Returns Object of ErrorObjListWithOpen. | 18 | + * Returns Object of ErrorObjListWithOpen. |
19 | - * | 19 | + * |
20 | - * @return Object of ErrorObjListWithOpen | 20 | + * @return Object of ErrorObjListWithOpen |
21 | - */ | 21 | + */ |
22 | - public ErrorObjListWithOpen getErrorObjListWithOpen(); | 22 | + public ErrorObjListWithOpen getErrorObjListWithOpen(); |
23 | - | 23 | + |
24 | - /** | 24 | + /** |
25 | - * Sets errObjListWithOpen object. | 25 | + * Sets errObjListWithOpen object. |
26 | - * | 26 | + * |
27 | - * @param errObjListWithOpen error object List with open object | 27 | + * @param errObjListWithOpen error object List with open object |
28 | - */ | 28 | + */ |
29 | - public void setErrorObjListWithOpen(ErrorObjListWithOpen errObjListWithOpen); | 29 | + public void setErrorObjListWithOpen(ErrorObjListWithOpen errObjListWithOpen); |
30 | - | 30 | + |
31 | - /** | 31 | + /** |
32 | - * Returns Object of PcepErrorInfo. | 32 | + * Returns Object of PcepErrorInfo. |
33 | - * | 33 | + * |
34 | - * @return Object of PcepErrorInfo | 34 | + * @return Object of PcepErrorInfo |
35 | - */ | 35 | + */ |
36 | - public PcepErrorInfo getPcepErrorInfo(); | 36 | + public PcepErrorInfo getPcepErrorInfo(); |
37 | - | 37 | + |
38 | - /** | 38 | + /** |
39 | - * Sets errInfo Object. | 39 | + * Sets errInfo Object. |
40 | - * | 40 | + * |
41 | - * @param errInfo error information | 41 | + * @param errInfo error information |
42 | - */ | 42 | + */ |
43 | - public void setPcepErrorInfo(PcepErrorInfo errInfo); | 43 | + public void setPcepErrorInfo(PcepErrorInfo errInfo); |
44 | - | 44 | + |
45 | - @Override | 45 | + @Override |
46 | - void writeTo(ChannelBuffer channelBuffer); | 46 | + void writeTo(ChannelBuffer channelBuffer); |
47 | - | 47 | + |
48 | - /** | 48 | + /** |
49 | - * Builder interface with get and set functions to build PCEP Error message. | 49 | + * Builder interface with get and set functions to build PCEP Error message. |
50 | - */ | 50 | + */ |
51 | - public interface Builder extends PcepMessage.Builder { | 51 | + public interface Builder extends PcepMessage.Builder { |
52 | - | 52 | + |
53 | - @Override | 53 | + @Override |
54 | - PcepErrorMsg build(); | 54 | + PcepErrorMsg build(); |
55 | - | 55 | + |
56 | - @Override | 56 | + @Override |
57 | - PcepVersion getVersion(); | 57 | + PcepVersion getVersion(); |
58 | - | 58 | + |
59 | - @Override | 59 | + @Override |
60 | - PcepType getType(); | 60 | + PcepType getType(); |
61 | - | 61 | + |
62 | - /** | 62 | + /** |
63 | - * Returns Object of ErrorObjListWithOpen. | 63 | + * Returns Object of ErrorObjListWithOpen. |
64 | - * | 64 | + * |
65 | - * @return Object of ErrorObjListWithOpen | 65 | + * @return Object of ErrorObjListWithOpen |
66 | - */ | 66 | + */ |
67 | - public ErrorObjListWithOpen getErrorObjListWithOpen(); | 67 | + public ErrorObjListWithOpen getErrorObjListWithOpen(); |
68 | - | 68 | + |
69 | - /** | 69 | + /** |
70 | - * Sets errObjListWithOpen object. | 70 | + * Sets errObjListWithOpen object. |
71 | - * | 71 | + * |
72 | - * @param errObjListWithOpen error object with open object | 72 | + * @param errObjListWithOpen error object with open object |
73 | - * @return builder by setting Object of ErrorObjListWithOpen | 73 | + * @return builder by setting Object of ErrorObjListWithOpen |
74 | - */ | 74 | + */ |
75 | - public Builder setErrorObjListWithOpen(ErrorObjListWithOpen errObjListWithOpen); | 75 | + public Builder setErrorObjListWithOpen(ErrorObjListWithOpen errObjListWithOpen); |
76 | - | 76 | + |
77 | - /** | 77 | + /** |
78 | - * Returns Object of PcepErrorInfo. | 78 | + * Returns Object of PcepErrorInfo. |
79 | - * | 79 | + * |
80 | - * @return Object of PcepErrorInfo | 80 | + * @return Object of PcepErrorInfo |
81 | - */ | 81 | + */ |
82 | - public PcepErrorInfo getPcepErrorInfo(); | 82 | + public PcepErrorInfo getPcepErrorInfo(); |
83 | - | 83 | + |
84 | - /** | 84 | + /** |
85 | - * Sets errInfo Object. | 85 | + * Sets errInfo Object. |
86 | - * | 86 | + * |
87 | - * @param errInfo error information | 87 | + * @param errInfo error information |
88 | - * @return builder by getting Object of PcepErrorInfo | 88 | + * @return builder by getting Object of PcepErrorInfo |
89 | - */ | 89 | + */ |
90 | - public Builder setPcepErrorInfo(PcepErrorInfo errInfo); | 90 | + public Builder setPcepErrorInfo(PcepErrorInfo errInfo); |
91 | - } | 91 | + } |
92 | -} | 92 | +} | ... | ... |
1 | -package org.onosproject.pcepio.protocol; | 1 | +package org.onosproject.pcepio.protocol; |
2 | - | 2 | + |
3 | -import java.util.LinkedList; | 3 | +import java.util.LinkedList; |
4 | - | 4 | + |
5 | -import org.jboss.netty.buffer.ChannelBuffer; | 5 | +import org.jboss.netty.buffer.ChannelBuffer; |
6 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 6 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
7 | -import org.onosproject.pcepio.types.PcepObjectHeader; | 7 | +import org.onosproject.pcepio.types.PcepObjectHeader; |
8 | -import org.onosproject.pcepio.types.PcepValueType; | 8 | +import org.onosproject.pcepio.types.PcepValueType; |
9 | - | 9 | + |
10 | -/** | 10 | +/** |
11 | - * Abstraction of an entity providing PCEP Error Object. | 11 | + * Abstraction of an entity providing PCEP Error Object. |
12 | - */ | 12 | + */ |
13 | -public interface PcepErrorObject { | 13 | +public interface PcepErrorObject { |
14 | - | 14 | + |
15 | - /** | 15 | + /** |
16 | - * Returns Error Type in Error Object. | 16 | + * Returns Error Type in Error Object. |
17 | - * | 17 | + * |
18 | - * @return Error Type in Error Object | 18 | + * @return Error Type in Error Object |
19 | - */ | 19 | + */ |
20 | - int getErrorType(); | 20 | + int getErrorType(); |
21 | - | 21 | + |
22 | - /** | 22 | + /** |
23 | - * Sets Error Type in Error Object. | 23 | + * Sets Error Type in Error Object. |
24 | - * | 24 | + * |
25 | - * @param value Error Type | 25 | + * @param value Error Type |
26 | - */ | 26 | + */ |
27 | - void setErrorType(byte value); | 27 | + void setErrorType(byte value); |
28 | - | 28 | + |
29 | - /** | 29 | + /** |
30 | - * Returns Error Value in Error Object. | 30 | + * Returns Error Value in Error Object. |
31 | - * | 31 | + * |
32 | - * @return Error Value | 32 | + * @return Error Value |
33 | - */ | 33 | + */ |
34 | - byte getErrorValue(); | 34 | + byte getErrorValue(); |
35 | - | 35 | + |
36 | - /** | 36 | + /** |
37 | - * Sets Error Value in Error Object. | 37 | + * Sets Error Value in Error Object. |
38 | - * | 38 | + * |
39 | - * @param value Error Value | 39 | + * @param value Error Value |
40 | - */ | 40 | + */ |
41 | - void setErrorValue(byte value); | 41 | + void setErrorValue(byte value); |
42 | - | 42 | + |
43 | - /** | 43 | + /** |
44 | - * Returns Optional Tlvs in Error Object. | 44 | + * Returns Optional Tlvs in Error Object. |
45 | - * | 45 | + * |
46 | - * @return list of Optional Tlvs in Error Object | 46 | + * @return list of Optional Tlvs in Error Object |
47 | - */ | 47 | + */ |
48 | - LinkedList<PcepValueType> getOptionalTlv(); | 48 | + LinkedList<PcepValueType> getOptionalTlv(); |
49 | - | 49 | + |
50 | - /** | 50 | + /** |
51 | - * Sets Optional Tlvs in Error Object. | 51 | + * Sets Optional Tlvs in Error Object. |
52 | - * | 52 | + * |
53 | - * @param llOptionalTlv list of Optional Tlvs | 53 | + * @param llOptionalTlv list of Optional Tlvs |
54 | - */ | 54 | + */ |
55 | - void setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); | 55 | + void setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); |
56 | - | 56 | + |
57 | - /** | 57 | + /** |
58 | - * Prints attributes of Error object. | 58 | + * Prints attributes of Error object. |
59 | - */ | 59 | + */ |
60 | - void print(); | 60 | + void print(); |
61 | - | 61 | + |
62 | - /** | 62 | + /** |
63 | - * Writes the Error Object into channel buffer. | 63 | + * Writes the Error Object into channel buffer. |
64 | - * | 64 | + * |
65 | - * @param bb channel buffer | 65 | + * @param bb channel buffer |
66 | - * @return Returns the writerIndex of this buffer | 66 | + * @return Returns the writerIndex of this buffer |
67 | - * @throws PcepParseException while writing Error Object into ChannelBuffer | 67 | + * @throws PcepParseException while writing Error Object into ChannelBuffer |
68 | - */ | 68 | + */ |
69 | - int write(ChannelBuffer bb) throws PcepParseException; | 69 | + int write(ChannelBuffer bb) throws PcepParseException; |
70 | - | 70 | + |
71 | - /** | 71 | + /** |
72 | - * Builder interface with get and set functions to build Error object. | 72 | + * Builder interface with get and set functions to build Error object. |
73 | - */ | 73 | + */ |
74 | - public interface Builder { | 74 | + public interface Builder { |
75 | - | 75 | + |
76 | - /** | 76 | + /** |
77 | - * Builds Error Object. | 77 | + * Builds Error Object. |
78 | - * | 78 | + * |
79 | - * @return Error Object. | 79 | + * @return Error Object. |
80 | - */ | 80 | + */ |
81 | - PcepErrorObject build(); | 81 | + PcepErrorObject build(); |
82 | - | 82 | + |
83 | - /** | 83 | + /** |
84 | - * Returns Error Object header. | 84 | + * Returns Error Object header. |
85 | - * | 85 | + * |
86 | - * @return Error Object header | 86 | + * @return Error Object header |
87 | - */ | 87 | + */ |
88 | - PcepObjectHeader getErrorObjHeader(); | 88 | + PcepObjectHeader getErrorObjHeader(); |
89 | - | 89 | + |
90 | - /** | 90 | + /** |
91 | - * Sets Error Object header and returns its Builder. | 91 | + * Sets Error Object header and returns its Builder. |
92 | - * | 92 | + * |
93 | - * @param obj Error Object header | 93 | + * @param obj Error Object header |
94 | - * @return Builder by setting Error Object header | 94 | + * @return Builder by setting Error Object header |
95 | - */ | 95 | + */ |
96 | - Builder setErrorObjHeader(PcepObjectHeader obj); | 96 | + Builder setErrorObjHeader(PcepObjectHeader obj); |
97 | - | 97 | + |
98 | - /** | 98 | + /** |
99 | - * Returns Error Type in Error Object. | 99 | + * Returns Error Type in Error Object. |
100 | - * | 100 | + * |
101 | - * @return Error Type in Error Object | 101 | + * @return Error Type in Error Object |
102 | - */ | 102 | + */ |
103 | - int getErrorType(); | 103 | + int getErrorType(); |
104 | - | 104 | + |
105 | - /** | 105 | + /** |
106 | - * Sets Error Type and returns its builder. | 106 | + * Sets Error Type and returns its builder. |
107 | - * | 107 | + * |
108 | - * @param value of Error-Type field | 108 | + * @param value of Error-Type field |
109 | - * @return builder by setting Error Type field. | 109 | + * @return builder by setting Error Type field. |
110 | - */ | 110 | + */ |
111 | - Builder setErrorType(byte value); | 111 | + Builder setErrorType(byte value); |
112 | - | 112 | + |
113 | - /** | 113 | + /** |
114 | - * Returns Error Value in Error Object. | 114 | + * Returns Error Value in Error Object. |
115 | - * | 115 | + * |
116 | - * @return Error Value | 116 | + * @return Error Value |
117 | - */ | 117 | + */ |
118 | - byte getErrorValue(); | 118 | + byte getErrorValue(); |
119 | - | 119 | + |
120 | - /** | 120 | + /** |
121 | - * Sets Error Value and returns its builder. | 121 | + * Sets Error Value and returns its builder. |
122 | - * | 122 | + * |
123 | - * @param value of Error-Value field | 123 | + * @param value of Error-Value field |
124 | - * @return Builder by setting Error Value field. | 124 | + * @return Builder by setting Error Value field. |
125 | - */ | 125 | + */ |
126 | - Builder setErrorValue(byte value); | 126 | + Builder setErrorValue(byte value); |
127 | - | 127 | + |
128 | - /** | 128 | + /** |
129 | - * Returns list of Optional Tlvs of Error Object. | 129 | + * Returns list of Optional Tlvs of Error Object. |
130 | - * | 130 | + * |
131 | - * @return list of Optional Tlvs of Error Object | 131 | + * @return list of Optional Tlvs of Error Object |
132 | - */ | 132 | + */ |
133 | - LinkedList<PcepValueType> getOptionalTlv(); | 133 | + LinkedList<PcepValueType> getOptionalTlv(); |
134 | - | 134 | + |
135 | - /** | 135 | + /** |
136 | - * Sets Optional Tlvs of Error Object and returns its Builder. | 136 | + * Sets Optional Tlvs of Error Object and returns its Builder. |
137 | - * | 137 | + * |
138 | - * @param llOptionalTlv Optional Tlvs of Error Object | 138 | + * @param llOptionalTlv Optional Tlvs of Error Object |
139 | - * @return Builder by setting Optional Tlvs. | 139 | + * @return Builder by setting Optional Tlvs. |
140 | - */ | 140 | + */ |
141 | - Builder setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); | 141 | + Builder setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); |
142 | - | 142 | + |
143 | - /** | 143 | + /** |
144 | - * Sets P flag in Error object header and returns its builder. | 144 | + * Sets P flag in Error object header and returns its builder. |
145 | - * | 145 | + * |
146 | - * @param value boolean value to set P flag | 146 | + * @param value boolean value to set P flag |
147 | - * @return Builder by setting P flag | 147 | + * @return Builder by setting P flag |
148 | - */ | 148 | + */ |
149 | - Builder setPFlag(boolean value); | 149 | + Builder setPFlag(boolean value); |
150 | - | 150 | + |
151 | - /** | 151 | + /** |
152 | - * Sets I flag in Error object header and returns its builder. | 152 | + * Sets I flag in Error object header and returns its builder. |
153 | - * | 153 | + * |
154 | - * @param value boolean value to set I flag | 154 | + * @param value boolean value to set I flag |
155 | - * @return Builder by setting I flag | 155 | + * @return Builder by setting I flag |
156 | - */ | 156 | + */ |
157 | - Builder setIFlag(boolean value); | 157 | + Builder setIFlag(boolean value); |
158 | - } | 158 | + } |
159 | -} | 159 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | - | 16 | + |
17 | -package org.onosproject.pcepio.protocol; | 17 | +package org.onosproject.pcepio.protocol; |
18 | - | 18 | + |
19 | -import org.jboss.netty.buffer.ChannelBuffer; | 19 | +import org.jboss.netty.buffer.ChannelBuffer; |
20 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 20 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
21 | -import org.slf4j.Logger; | 21 | +import org.slf4j.Logger; |
22 | -import org.slf4j.LoggerFactory; | 22 | +import org.slf4j.LoggerFactory; |
23 | - | 23 | + |
24 | -public final class PcepFactories { | 24 | +public final class PcepFactories { |
25 | - | 25 | + |
26 | - protected static final Logger log = LoggerFactory.getLogger(PcepFactories.class); | 26 | + protected static final Logger log = LoggerFactory.getLogger(PcepFactories.class); |
27 | - | 27 | + |
28 | - private static final GenericReader GENERIC_READER = new GenericReader(); | 28 | + private static final GenericReader GENERIC_READER = new GenericReader(); |
29 | - | 29 | + |
30 | - public static final byte SHIFT_FLAG = 5; | 30 | + public static final byte SHIFT_FLAG = 5; |
31 | - | 31 | + |
32 | - private PcepFactories() { | 32 | + private PcepFactories() { |
33 | - } | 33 | + } |
34 | - | 34 | + |
35 | - /* | 35 | + /* |
36 | - * Returns the instance of PCEP Version. | 36 | + * Returns the instance of PCEP Version. |
37 | - * | 37 | + * |
38 | - * @param version | 38 | + * @param version |
39 | - * @return PCEP version | 39 | + * @return PCEP version |
40 | - */ | 40 | + */ |
41 | - public static PcepFactory getFactory(PcepVersion version) { | 41 | + public static PcepFactory getFactory(PcepVersion version) { |
42 | - switch (version) { | 42 | + switch (version) { |
43 | - case PCEP_1: | 43 | + case PCEP_1: |
44 | - // TODO : to get the pcep version 1 factory | 44 | + // TODO : to get the pcep version 1 factory |
45 | - default: | 45 | + default: |
46 | - throw new IllegalArgumentException("[PcepFactory:]Unknown version: " + version); | 46 | + throw new IllegalArgumentException("[PcepFactory:]Unknown version: " + version); |
47 | - } | 47 | + } |
48 | - } | 48 | + } |
49 | - | 49 | + |
50 | - private static class GenericReader implements PcepMessageReader<PcepMessage> { | 50 | + private static class GenericReader implements PcepMessageReader<PcepMessage> { |
51 | - | 51 | + |
52 | - @Override | 52 | + @Override |
53 | - public PcepMessage readFrom(ChannelBuffer bb) throws PcepParseException { | 53 | + public PcepMessage readFrom(ChannelBuffer bb) throws PcepParseException { |
54 | - | 54 | + |
55 | - if (!bb.readable()) { | 55 | + if (!bb.readable()) { |
56 | - log.debug("Empty message received"); | 56 | + log.debug("Empty message received"); |
57 | - throw new PcepParseException("Empty message received"); | 57 | + throw new PcepParseException("Empty message received"); |
58 | - } | 58 | + } |
59 | - | 59 | + |
60 | - /* | 60 | + /* |
61 | - * 0 1 2 3 | 61 | + * 0 1 2 3 |
62 | - * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 62 | + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 |
63 | - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 63 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
64 | - * | Ver | Flags | | | 64 | + * | Ver | Flags | | |
65 | - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 65 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
66 | - * | 66 | + * |
67 | - * Currently Version 1 is supported | 67 | + * Currently Version 1 is supported |
68 | - * Currently no flags are used, it is all ignored | 68 | + * Currently no flags are used, it is all ignored |
69 | - */ | 69 | + */ |
70 | - | 70 | + |
71 | - byte packetVersion = bb.getByte(bb.readerIndex()); | 71 | + byte packetVersion = bb.getByte(bb.readerIndex()); |
72 | - packetVersion = (byte) (packetVersion >> SHIFT_FLAG); | 72 | + packetVersion = (byte) (packetVersion >> SHIFT_FLAG); |
73 | - PcepFactory factory; | 73 | + PcepFactory factory; |
74 | - | 74 | + |
75 | - switch (packetVersion) { | 75 | + switch (packetVersion) { |
76 | - | 76 | + |
77 | - case 1: | 77 | + case 1: |
78 | - // TODO : get the factory for version 1 | 78 | + // TODO : get the factory for version 1 |
79 | - break; | 79 | + break; |
80 | - default: | 80 | + default: |
81 | - throw new IllegalArgumentException("Unknown Packet version: " + packetVersion); | 81 | + throw new IllegalArgumentException("Unknown Packet version: " + packetVersion); |
82 | - } | 82 | + } |
83 | - // TODO : Read the PCEP message from the factory | 83 | + // TODO : Read the PCEP message from the factory |
84 | - return null; | 84 | + return null; |
85 | - } | 85 | + } |
86 | - } | 86 | + } |
87 | - | 87 | + |
88 | - /* | 88 | + /* |
89 | - * Returns GENERIC_READER. | 89 | + * Returns GENERIC_READER. |
90 | - * | 90 | + * |
91 | - * @return GENERIC_READER | 91 | + * @return GENERIC_READER |
92 | - */ | 92 | + */ |
93 | - public static PcepMessageReader<PcepMessage> getGenericReader() { | 93 | + public static PcepMessageReader<PcepMessage> getGenericReader() { |
94 | - return GENERIC_READER; | 94 | + return GENERIC_READER; |
95 | - } | 95 | + } |
96 | -} | 96 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | - | 16 | + |
17 | -package org.onosproject.pcepio.protocol; | 17 | +package org.onosproject.pcepio.protocol; |
18 | - | 18 | + |
19 | -import java.util.LinkedList; | 19 | +import java.util.LinkedList; |
20 | - | 20 | + |
21 | -import org.jboss.netty.buffer.ChannelBuffer; | 21 | +import org.jboss.netty.buffer.ChannelBuffer; |
22 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 22 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
23 | - | 23 | + |
24 | -/** | 24 | +/** |
25 | - * Abstraction of an entity providing PCEP Initiate Message. | 25 | + * Abstraction of an entity providing PCEP Initiate Message. |
26 | - */ | 26 | + */ |
27 | -public interface PcepInitiateMsg extends PcepObject, PcepMessage { | 27 | +public interface PcepInitiateMsg extends PcepObject, PcepMessage { |
28 | - | 28 | + |
29 | - @Override | 29 | + @Override |
30 | - PcepVersion getVersion(); | 30 | + PcepVersion getVersion(); |
31 | - | 31 | + |
32 | - @Override | 32 | + @Override |
33 | - PcepType getType(); | 33 | + PcepType getType(); |
34 | - | 34 | + |
35 | - /** | 35 | + /** |
36 | - * Returns list of PcInitiatedLspRequestList. | 36 | + * Returns list of PcInitiatedLspRequestList. |
37 | - * | 37 | + * |
38 | - * @return list of PcInitiatedLspRequestList | 38 | + * @return list of PcInitiatedLspRequestList |
39 | - */ | 39 | + */ |
40 | - LinkedList<PcInitiatedLspRequest> getPcInitiatedLspRequestList(); | 40 | + LinkedList<PcInitiatedLspRequest> getPcInitiatedLspRequestList(); |
41 | - | 41 | + |
42 | - /** | 42 | + /** |
43 | - * Sets list of PcInitiatedLspRequestList. | 43 | + * Sets list of PcInitiatedLspRequestList. |
44 | - * | 44 | + * |
45 | - * @param llPcInitiatedLspRequestList list of PcInitiatedLspRequestList | 45 | + * @param llPcInitiatedLspRequestList list of PcInitiatedLspRequestList |
46 | - */ | 46 | + */ |
47 | - void setPcInitiatedLspRequestList(LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList); | 47 | + void setPcInitiatedLspRequestList(LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList); |
48 | - | 48 | + |
49 | - @Override | 49 | + @Override |
50 | - void writeTo(ChannelBuffer channelBuffer) throws PcepParseException; | 50 | + void writeTo(ChannelBuffer channelBuffer) throws PcepParseException; |
51 | - | 51 | + |
52 | - /** | 52 | + /** |
53 | - * Builder interface with get and set functions to build Initiate message. | 53 | + * Builder interface with get and set functions to build Initiate message. |
54 | - */ | 54 | + */ |
55 | - public interface Builder extends PcepMessage.Builder { | 55 | + public interface Builder extends PcepMessage.Builder { |
56 | - | 56 | + |
57 | - @Override | 57 | + @Override |
58 | - PcepInitiateMsg build(); | 58 | + PcepInitiateMsg build(); |
59 | - | 59 | + |
60 | - @Override | 60 | + @Override |
61 | - PcepVersion getVersion(); | 61 | + PcepVersion getVersion(); |
62 | - | 62 | + |
63 | - @Override | 63 | + @Override |
64 | - PcepType getType(); | 64 | + PcepType getType(); |
65 | - | 65 | + |
66 | - /** | 66 | + /** |
67 | - * Returns list of PcInitiatedLspRequestList. | 67 | + * Returns list of PcInitiatedLspRequestList. |
68 | - * | 68 | + * |
69 | - * @return list of PcInitiatedLspRequestList | 69 | + * @return list of PcInitiatedLspRequestList |
70 | - */ | 70 | + */ |
71 | - LinkedList<PcInitiatedLspRequest> getPcInitiatedLspRequestList(); | 71 | + LinkedList<PcInitiatedLspRequest> getPcInitiatedLspRequestList(); |
72 | - | 72 | + |
73 | - /** | 73 | + /** |
74 | - * Sets PcInitiatedLspRequestList. | 74 | + * Sets PcInitiatedLspRequestList. |
75 | - * | 75 | + * |
76 | - * @param llPcInitiatedLspRequestList list of PcInitiatedLspRequestList | 76 | + * @param llPcInitiatedLspRequestList list of PcInitiatedLspRequestList |
77 | - * @return builder by setting list of PcInitiatedLspRequestList | 77 | + * @return builder by setting list of PcInitiatedLspRequestList |
78 | - */ | 78 | + */ |
79 | - Builder setPcInitiatedLspRequestList(LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList); | 79 | + Builder setPcInitiatedLspRequestList(LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList); |
80 | - } | 80 | + } |
81 | } | 81 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import org.jboss.netty.buffer.ChannelBuffer; | 18 | +import org.jboss.netty.buffer.ChannelBuffer; |
19 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 19 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
20 | -import org.onosproject.pcepio.types.PcepObjectHeader; | 20 | +import org.onosproject.pcepio.types.PcepObjectHeader; |
21 | - | 21 | + |
22 | -/** | 22 | +/** |
23 | - * Abstraction of an entity providing PCEP INTER Layer Object. | 23 | + * Abstraction of an entity providing PCEP INTER Layer Object. |
24 | - */ | 24 | + */ |
25 | -public interface PcepInterLayerObject { | 25 | +public interface PcepInterLayerObject { |
26 | - | 26 | + |
27 | - /** | 27 | + /** |
28 | - * Returns N Flag in INTER Layer Object. | 28 | + * Returns N Flag in INTER Layer Object. |
29 | - * | 29 | + * |
30 | - * @return N Flag in INTER Layer Object | 30 | + * @return N Flag in INTER Layer Object |
31 | - */ | 31 | + */ |
32 | - boolean getbNFlag(); | 32 | + boolean getbNFlag(); |
33 | - | 33 | + |
34 | - /** | 34 | + /** |
35 | - * Sets N Flag in INTER Layer Object with specified value. | 35 | + * Sets N Flag in INTER Layer Object with specified value. |
36 | - * | 36 | + * |
37 | - * @param value N Flag | 37 | + * @param value N Flag |
38 | - */ | 38 | + */ |
39 | - void setbNFlag(boolean value); | 39 | + void setbNFlag(boolean value); |
40 | - | 40 | + |
41 | - /** | 41 | + /** |
42 | - * Returns I Flag in INTER Layer Object. | 42 | + * Returns I Flag in INTER Layer Object. |
43 | - * | 43 | + * |
44 | - * @return I Flag in INTER Layer Object | 44 | + * @return I Flag in INTER Layer Object |
45 | - */ | 45 | + */ |
46 | - boolean getbIFlag(); | 46 | + boolean getbIFlag(); |
47 | - | 47 | + |
48 | - /** | 48 | + /** |
49 | - * Sets I Flag in INTER Layer Object with specified value. | 49 | + * Sets I Flag in INTER Layer Object with specified value. |
50 | - * | 50 | + * |
51 | - * @param value I Flag | 51 | + * @param value I Flag |
52 | - */ | 52 | + */ |
53 | - void setbIFlag(boolean value); | 53 | + void setbIFlag(boolean value); |
54 | - | 54 | + |
55 | - /** | 55 | + /** |
56 | - * Prints attributes of INTER Layer object. | 56 | + * Prints attributes of INTER Layer object. |
57 | - */ | 57 | + */ |
58 | - void print(); | 58 | + void print(); |
59 | - | 59 | + |
60 | - /** | 60 | + /** |
61 | - * Writes the INTER Layer Object into channel buffer. | 61 | + * Writes the INTER Layer Object into channel buffer. |
62 | - * | 62 | + * |
63 | - * @param bb channel buffer | 63 | + * @param bb channel buffer |
64 | - * @return Returns the writerIndex of this buffer | 64 | + * @return Returns the writerIndex of this buffer |
65 | - * @throws PcepParseException while writing Inter Layer Object. | 65 | + * @throws PcepParseException while writing Inter Layer Object. |
66 | - */ | 66 | + */ |
67 | - int write(ChannelBuffer bb) throws PcepParseException; | 67 | + int write(ChannelBuffer bb) throws PcepParseException; |
68 | - | 68 | + |
69 | - /** | 69 | + /** |
70 | - * Builder interface with get and set functions to build INTER Layer object. | 70 | + * Builder interface with get and set functions to build INTER Layer object. |
71 | - */ | 71 | + */ |
72 | - public interface Builder { | 72 | + public interface Builder { |
73 | - | 73 | + |
74 | - /** | 74 | + /** |
75 | - * Builds INTER Layer object. | 75 | + * Builds INTER Layer object. |
76 | - * | 76 | + * |
77 | - * @return INTER Layer object | 77 | + * @return INTER Layer object |
78 | - */ | 78 | + */ |
79 | - PcepInterLayerObject build(); | 79 | + PcepInterLayerObject build(); |
80 | - | 80 | + |
81 | - /** | 81 | + /** |
82 | - * Returns INTER Layer object header. | 82 | + * Returns INTER Layer object header. |
83 | - * | 83 | + * |
84 | - * @return INTER Layer object header | 84 | + * @return INTER Layer object header |
85 | - */ | 85 | + */ |
86 | - PcepObjectHeader getInterLayerObjHeader(); | 86 | + PcepObjectHeader getInterLayerObjHeader(); |
87 | - | 87 | + |
88 | - /** | 88 | + /** |
89 | - * Sets INTER Layer object header and returns its builder. | 89 | + * Sets INTER Layer object header and returns its builder. |
90 | - * | 90 | + * |
91 | - * @param obj INTER Layer object header | 91 | + * @param obj INTER Layer object header |
92 | - * @return Builder by setting INTER Layer object header | 92 | + * @return Builder by setting INTER Layer object header |
93 | - */ | 93 | + */ |
94 | - Builder setInterLayerObjHeader(PcepObjectHeader obj); | 94 | + Builder setInterLayerObjHeader(PcepObjectHeader obj); |
95 | - | 95 | + |
96 | - /** | 96 | + /** |
97 | - * Returns N Flag in INTER Layer Object. | 97 | + * Returns N Flag in INTER Layer Object. |
98 | - * | 98 | + * |
99 | - * @return N Flag in INTER Layer Object | 99 | + * @return N Flag in INTER Layer Object |
100 | - */ | 100 | + */ |
101 | - boolean getbNFlag(); | 101 | + boolean getbNFlag(); |
102 | - | 102 | + |
103 | - /** | 103 | + /** |
104 | - * Sets N flag and return its builder. | 104 | + * Sets N flag and return its builder. |
105 | - * | 105 | + * |
106 | - * @param value N flag | 106 | + * @param value N flag |
107 | - * @return Builder by setting N flag | 107 | + * @return Builder by setting N flag |
108 | - */ | 108 | + */ |
109 | - Builder setbNFlag(boolean value); | 109 | + Builder setbNFlag(boolean value); |
110 | - | 110 | + |
111 | - /** | 111 | + /** |
112 | - * Returns I Flag in INTER Layer Object. | 112 | + * Returns I Flag in INTER Layer Object. |
113 | - * | 113 | + * |
114 | - * @return I Flag in INTER Layer Object | 114 | + * @return I Flag in INTER Layer Object |
115 | - */ | 115 | + */ |
116 | - boolean getbIFlag(); | 116 | + boolean getbIFlag(); |
117 | - | 117 | + |
118 | - /** | 118 | + /** |
119 | - * Sets I flag and return its builder. | 119 | + * Sets I flag and return its builder. |
120 | - * | 120 | + * |
121 | - * @param value I flag | 121 | + * @param value I flag |
122 | - * @return Builder by setting N flag | 122 | + * @return Builder by setting N flag |
123 | - */ | 123 | + */ |
124 | - Builder setbIFlag(boolean value); | 124 | + Builder setbIFlag(boolean value); |
125 | - | 125 | + |
126 | - /** | 126 | + /** |
127 | - * Sets P flag in INTER Layer object header and returns its builder. | 127 | + * Sets P flag in INTER Layer object header and returns its builder. |
128 | - * | 128 | + * |
129 | - * @param value boolean value to set P flag | 129 | + * @param value boolean value to set P flag |
130 | - * @return Builder by setting P flag | 130 | + * @return Builder by setting P flag |
131 | - */ | 131 | + */ |
132 | - Builder setPFlag(boolean value); | 132 | + Builder setPFlag(boolean value); |
133 | - | 133 | + |
134 | - /** | 134 | + /** |
135 | - * Sets I flag in INTER Layer object header and returns its builder. | 135 | + * Sets I flag in INTER Layer object header and returns its builder. |
136 | - * | 136 | + * |
137 | - * @param value boolean value to set I flag | 137 | + * @param value boolean value to set I flag |
138 | - * @return Builder by setting I flag | 138 | + * @return Builder by setting I flag |
139 | - */ | 139 | + */ |
140 | - Builder setIFlag(boolean value); | 140 | + Builder setIFlag(boolean value); |
141 | - } | 141 | + } |
142 | -} | 142 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import java.util.LinkedList; | 18 | +import java.util.LinkedList; |
19 | -import org.jboss.netty.buffer.ChannelBuffer; | 19 | +import org.jboss.netty.buffer.ChannelBuffer; |
20 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 20 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
21 | -import org.onosproject.pcepio.types.PcepObjectHeader; | 21 | +import org.onosproject.pcepio.types.PcepObjectHeader; |
22 | -import org.onosproject.pcepio.types.PcepValueType; | 22 | +import org.onosproject.pcepio.types.PcepValueType; |
23 | - | 23 | + |
24 | -/** | 24 | +/** |
25 | - * Abstraction of an entity providing PCEP IRO Object. | 25 | + * Abstraction of an entity providing PCEP IRO Object. |
26 | - */ | 26 | + */ |
27 | -public interface PcepIroObject { | 27 | +public interface PcepIroObject { |
28 | - | 28 | + |
29 | - /** | 29 | + /** |
30 | - * Returns list of SubObjects. | 30 | + * Returns list of SubObjects. |
31 | - * | 31 | + * |
32 | - * @return list of SubObjects | 32 | + * @return list of SubObjects |
33 | - */ | 33 | + */ |
34 | - LinkedList<PcepValueType> getSubObjects(); | 34 | + LinkedList<PcepValueType> getSubObjects(); |
35 | - | 35 | + |
36 | - /** | 36 | + /** |
37 | - * Sets list of SubObjects. | 37 | + * Sets list of SubObjects. |
38 | - * | 38 | + * |
39 | - * @param llSubObjects list of SubObjects | 39 | + * @param llSubObjects list of SubObjects |
40 | - */ | 40 | + */ |
41 | - void setSubObjects(LinkedList<PcepValueType> llSubObjects); | 41 | + void setSubObjects(LinkedList<PcepValueType> llSubObjects); |
42 | - | 42 | + |
43 | - /** | 43 | + /** |
44 | - * Prints attributes of IRO object. | 44 | + * Prints attributes of IRO object. |
45 | - */ | 45 | + */ |
46 | - void print(); | 46 | + void print(); |
47 | - | 47 | + |
48 | - /** | 48 | + /** |
49 | - * Writes the IRO into channel buffer. | 49 | + * Writes the IRO into channel buffer. |
50 | - * | 50 | + * |
51 | - * @param bb channel buffer | 51 | + * @param bb channel buffer |
52 | - * @return Returns the writerIndex of this buffer | 52 | + * @return Returns the writerIndex of this buffer |
53 | - * @throws PcepParseException while writing IRO object. | 53 | + * @throws PcepParseException while writing IRO object. |
54 | - */ | 54 | + */ |
55 | - public int write(ChannelBuffer bb) throws PcepParseException; | 55 | + public int write(ChannelBuffer bb) throws PcepParseException; |
56 | - | 56 | + |
57 | - /** | 57 | + /** |
58 | - * Builder interface with get and set functions to build IRO object. | 58 | + * Builder interface with get and set functions to build IRO object. |
59 | - */ | 59 | + */ |
60 | - public interface Builder { | 60 | + public interface Builder { |
61 | - | 61 | + |
62 | - /** | 62 | + /** |
63 | - * Builds IRO Object. | 63 | + * Builds IRO Object. |
64 | - * | 64 | + * |
65 | - * @return IRO Object | 65 | + * @return IRO Object |
66 | - */ | 66 | + */ |
67 | - PcepIroObject build(); | 67 | + PcepIroObject build(); |
68 | - | 68 | + |
69 | - /** | 69 | + /** |
70 | - * Returns IRO object header. | 70 | + * Returns IRO object header. |
71 | - * | 71 | + * |
72 | - * @return IRO object header | 72 | + * @return IRO object header |
73 | - */ | 73 | + */ |
74 | - PcepObjectHeader getIroObjHeader(); | 74 | + PcepObjectHeader getIroObjHeader(); |
75 | - | 75 | + |
76 | - /** | 76 | + /** |
77 | - * Sets IRO object header and returns its builder. | 77 | + * Sets IRO object header and returns its builder. |
78 | - * | 78 | + * |
79 | - * @param obj IRO object header | 79 | + * @param obj IRO object header |
80 | - * @return Builder by setting IRO object header | 80 | + * @return Builder by setting IRO object header |
81 | - */ | 81 | + */ |
82 | - Builder setIroObjHeader(PcepObjectHeader obj); | 82 | + Builder setIroObjHeader(PcepObjectHeader obj); |
83 | - | 83 | + |
84 | - /** | 84 | + /** |
85 | - * Returns list of SubObjects. | 85 | + * Returns list of SubObjects. |
86 | - * | 86 | + * |
87 | - * @return list of SubObjects | 87 | + * @return list of SubObjects |
88 | - */ | 88 | + */ |
89 | - LinkedList<PcepValueType> getSubObjects(); | 89 | + LinkedList<PcepValueType> getSubObjects(); |
90 | - | 90 | + |
91 | - /** | 91 | + /** |
92 | - * Sets list of SubObjects in IRO Object and returns its builder. | 92 | + * Sets list of SubObjects in IRO Object and returns its builder. |
93 | - * | 93 | + * |
94 | - * @param llSubObjects list of SubObjects | 94 | + * @param llSubObjects list of SubObjects |
95 | - * @return Builder by setting list of SubObjects | 95 | + * @return Builder by setting list of SubObjects |
96 | - */ | 96 | + */ |
97 | - Builder setSubObjects(LinkedList<PcepValueType> llSubObjects); | 97 | + Builder setSubObjects(LinkedList<PcepValueType> llSubObjects); |
98 | - | 98 | + |
99 | - /** | 99 | + /** |
100 | - * Sets P flag in IRO object header and returns its builder. | 100 | + * Sets P flag in IRO object header and returns its builder. |
101 | - * | 101 | + * |
102 | - * @param value boolean value to set P flag | 102 | + * @param value boolean value to set P flag |
103 | - * @return Builder by setting P flag | 103 | + * @return Builder by setting P flag |
104 | - */ | 104 | + */ |
105 | - Builder setPFlag(boolean value); | 105 | + Builder setPFlag(boolean value); |
106 | - | 106 | + |
107 | - /** | 107 | + /** |
108 | - * Sets I flag in IRO object header and returns its builder. | 108 | + * Sets I flag in IRO object header and returns its builder. |
109 | - * | 109 | + * |
110 | - * @param value boolean value to set I flag | 110 | + * @param value boolean value to set I flag |
111 | - * @return Builder by setting I flag | 111 | + * @return Builder by setting I flag |
112 | - */ | 112 | + */ |
113 | - Builder setIFlag(boolean value); | 113 | + Builder setIFlag(boolean value); |
114 | - } | 114 | + } |
115 | -} | 115 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | - | 16 | + |
17 | -package org.onosproject.pcepio.protocol; | 17 | +package org.onosproject.pcepio.protocol; |
18 | - | 18 | + |
19 | -import java.util.LinkedList; | 19 | +import java.util.LinkedList; |
20 | - | 20 | + |
21 | -import org.jboss.netty.buffer.ChannelBuffer; | 21 | +import org.jboss.netty.buffer.ChannelBuffer; |
22 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 22 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
23 | - | 23 | + |
24 | -/** | 24 | +/** |
25 | - * Abstraction of an entity providing PCEP Label Range. | 25 | + * Abstraction of an entity providing PCEP Label Range. |
26 | - */ | 26 | + */ |
27 | -public interface PcepLabelRange { | 27 | +public interface PcepLabelRange { |
28 | - | 28 | + |
29 | - /** | 29 | + /** |
30 | - * Returns object of PCEP SRP Object. | 30 | + * Returns object of PCEP SRP Object. |
31 | - * | 31 | + * |
32 | - * @return srpObject | 32 | + * @return srpObject |
33 | - */ | 33 | + */ |
34 | - public PcepSrpObject getSrpObject(); | 34 | + public PcepSrpObject getSrpObject(); |
35 | - | 35 | + |
36 | - /** | 36 | + /** |
37 | - * Sets PCEP SRP Object. | 37 | + * Sets PCEP SRP Object. |
38 | - * | 38 | + * |
39 | - * @param srpObject SRP object. | 39 | + * @param srpObject SRP object. |
40 | - */ | 40 | + */ |
41 | - public void setSrpObject(PcepSrpObject srpObject); | 41 | + public void setSrpObject(PcepSrpObject srpObject); |
42 | - | 42 | + |
43 | - /** | 43 | + /** |
44 | - * Returns list of PcepLabelRangeObject. | 44 | + * Returns list of PcepLabelRangeObject. |
45 | - * | 45 | + * |
46 | - * @return Label Range List | 46 | + * @return Label Range List |
47 | - */ | 47 | + */ |
48 | - public LinkedList<PcepLabelRangeObject> getLabelRangeList(); | 48 | + public LinkedList<PcepLabelRangeObject> getLabelRangeList(); |
49 | - | 49 | + |
50 | - /** | 50 | + /** |
51 | - * Sets list of PcepLabelRangeObject. | 51 | + * Sets list of PcepLabelRangeObject. |
52 | - * | 52 | + * |
53 | - * @param llLabelRangeList Label Range List | 53 | + * @param llLabelRangeList Label Range List |
54 | - */ | 54 | + */ |
55 | - public void setLabelRangeList(LinkedList<PcepLabelRangeObject> llLabelRangeList); | 55 | + public void setLabelRangeList(LinkedList<PcepLabelRangeObject> llLabelRangeList); |
56 | - | 56 | + |
57 | - /** | 57 | + /** |
58 | - * Write the byte stream of PcepLabelRange to channel buffer. | 58 | + * Write the byte stream of PcepLabelRange to channel buffer. |
59 | - * | 59 | + * |
60 | - * @param bb of type channel buffer | 60 | + * @param bb of type channel buffer |
61 | - * @return object length index | 61 | + * @return object length index |
62 | - * @throws PcepParseException while writing LABEL RANGE into Channel Buffer. | 62 | + * @throws PcepParseException while writing LABEL RANGE into Channel Buffer. |
63 | - */ | 63 | + */ |
64 | - public int write(ChannelBuffer bb) throws PcepParseException; | 64 | + public int write(ChannelBuffer bb) throws PcepParseException; |
65 | - | 65 | + |
66 | - /** | 66 | + /** |
67 | - * Prints Attributes of PcepLabelRange. | 67 | + * Prints Attributes of PcepLabelRange. |
68 | - */ | 68 | + */ |
69 | - public void print(); | 69 | + public void print(); |
70 | } | 70 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2014 Open Networking Laboratory | 2 | + * Copyright 2014 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import org.jboss.netty.buffer.ChannelBuffer; | 18 | +import org.jboss.netty.buffer.ChannelBuffer; |
19 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 19 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
20 | -import org.onosproject.pcepio.types.PcepLabelDownload; | 20 | +import org.onosproject.pcepio.types.PcepLabelDownload; |
21 | -import org.onosproject.pcepio.types.PcepLabelMap; | 21 | +import org.onosproject.pcepio.types.PcepLabelMap; |
22 | - | 22 | + |
23 | -/*** | 23 | +/*** |
24 | - * Abstraction to provide PCEP Label Updates. | 24 | + * Abstraction to provide PCEP Label Updates. |
25 | - */ | 25 | + */ |
26 | -public interface PcepLabelUpdate { | 26 | +public interface PcepLabelUpdate { |
27 | - | 27 | + |
28 | - /** | 28 | + /** |
29 | - * Writes the byte stream of PcepLabelUpdate into channel buffer. | 29 | + * Writes the byte stream of PcepLabelUpdate into channel buffer. |
30 | - * | 30 | + * |
31 | - * @param bb of type channel buffer | 31 | + * @param bb of type channel buffer |
32 | - * @throws PcepParseException while writing LABEL UPDATE. | 32 | + * @throws PcepParseException while writing LABEL UPDATE. |
33 | - */ | 33 | + */ |
34 | - public void write(ChannelBuffer bb) throws PcepParseException; | 34 | + public void write(ChannelBuffer bb) throws PcepParseException; |
35 | - | 35 | + |
36 | - /** | 36 | + /** |
37 | - * Sets the Label Download object. | 37 | + * Sets the Label Download object. |
38 | - * | 38 | + * |
39 | - * @param labelDownload PCEP Label Download object | 39 | + * @param labelDownload PCEP Label Download object |
40 | - */ | 40 | + */ |
41 | - public void setLabelDownload(PcepLabelDownload labelDownload); | 41 | + public void setLabelDownload(PcepLabelDownload labelDownload); |
42 | - | 42 | + |
43 | - /** | 43 | + /** |
44 | - * Returns the PcepLabelDownload object. | 44 | + * Returns the PcepLabelDownload object. |
45 | - * | 45 | + * |
46 | - * @return labelDownload PCEP Label Download | 46 | + * @return labelDownload PCEP Label Download |
47 | - */ | 47 | + */ |
48 | - public PcepLabelDownload getLabelDownload(); | 48 | + public PcepLabelDownload getLabelDownload(); |
49 | - | 49 | + |
50 | - /** | 50 | + /** |
51 | - * Sets the Label map object. | 51 | + * Sets the Label map object. |
52 | - * | 52 | + * |
53 | - * @param labelMap PCEP Label Map object | 53 | + * @param labelMap PCEP Label Map object |
54 | - */ | 54 | + */ |
55 | - public void setLabelMap(PcepLabelMap labelMap); | 55 | + public void setLabelMap(PcepLabelMap labelMap); |
56 | - | 56 | + |
57 | - /** | 57 | + /** |
58 | - * Returns the PcepLabelMap object. | 58 | + * Returns the PcepLabelMap object. |
59 | - * | 59 | + * |
60 | - * @return labelMap PCEP Label Map | 60 | + * @return labelMap PCEP Label Map |
61 | - */ | 61 | + */ |
62 | - public PcepLabelMap getLabelMap(); | 62 | + public PcepLabelMap getLabelMap(); |
63 | - | 63 | + |
64 | - /** | 64 | + /** |
65 | - * Prints the attributes of PCEP Label update. | 65 | + * Prints the attributes of PCEP Label update. |
66 | - */ | 66 | + */ |
67 | - public void print(); | 67 | + public void print(); |
68 | - | 68 | + |
69 | - /** | 69 | + /** |
70 | - * Builder interface with get and set functions to build Label Update message. | 70 | + * Builder interface with get and set functions to build Label Update message. |
71 | - */ | 71 | + */ |
72 | - public interface Builder { | 72 | + public interface Builder { |
73 | - | 73 | + |
74 | - /** | 74 | + /** |
75 | - * Builds PcepLableUpdate Object. | 75 | + * Builds PcepLableUpdate Object. |
76 | - * | 76 | + * |
77 | - * @return PcepLableUpdate Object | 77 | + * @return PcepLableUpdate Object |
78 | - * @throws PcepParseException while building LABEL-UPDATE. | 78 | + * @throws PcepParseException while building LABEL-UPDATE. |
79 | - */ | 79 | + */ |
80 | - PcepLabelUpdate build() throws PcepParseException; | 80 | + PcepLabelUpdate build() throws PcepParseException; |
81 | - | 81 | + |
82 | - /** | 82 | + /** |
83 | - * Sets the Label Download object. | 83 | + * Sets the Label Download object. |
84 | - * | 84 | + * |
85 | - * @param labelDownload PCEP Label Download object | 85 | + * @param labelDownload PCEP Label Download object |
86 | - * @return Builder by setting labelDownload object | 86 | + * @return Builder by setting labelDownload object |
87 | - */ | 87 | + */ |
88 | - Builder setLabelDownload(PcepLabelDownload labelDownload); | 88 | + Builder setLabelDownload(PcepLabelDownload labelDownload); |
89 | - | 89 | + |
90 | - /** | 90 | + /** |
91 | - * Returns the PcepLabelDownload object. | 91 | + * Returns the PcepLabelDownload object. |
92 | - * | 92 | + * |
93 | - * @return labelDownload PCEP Label Download | 93 | + * @return labelDownload PCEP Label Download |
94 | - */ | 94 | + */ |
95 | - PcepLabelDownload getLabelDownload(); | 95 | + PcepLabelDownload getLabelDownload(); |
96 | - | 96 | + |
97 | - /** | 97 | + /** |
98 | - * Sets the Label map object. | 98 | + * Sets the Label map object. |
99 | - * | 99 | + * |
100 | - * @param labelMap PCEP Label Map object | 100 | + * @param labelMap PCEP Label Map object |
101 | - * @return Builder by setting PcepLabelMap object | 101 | + * @return Builder by setting PcepLabelMap object |
102 | - */ | 102 | + */ |
103 | - Builder setLabelMap(PcepLabelMap labelMap); | 103 | + Builder setLabelMap(PcepLabelMap labelMap); |
104 | - | 104 | + |
105 | - /** | 105 | + /** |
106 | - * Returns the PcepLabelMap object. | 106 | + * Returns the PcepLabelMap object. |
107 | - * | 107 | + * |
108 | - * @return labelMap PCEP Label Map | 108 | + * @return labelMap PCEP Label Map |
109 | - */ | 109 | + */ |
110 | - PcepLabelMap getLabelMap(); | 110 | + PcepLabelMap getLabelMap(); |
111 | - } | 111 | + } |
112 | - | 112 | + |
113 | -} | 113 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import java.util.LinkedList; | 18 | +import java.util.LinkedList; |
19 | - | 19 | + |
20 | -import org.jboss.netty.buffer.ChannelBuffer; | 20 | +import org.jboss.netty.buffer.ChannelBuffer; |
21 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 21 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
22 | -import org.onosproject.pcepio.types.PcepObjectHeader; | 22 | +import org.onosproject.pcepio.types.PcepObjectHeader; |
23 | -import org.onosproject.pcepio.types.PcepValueType; | 23 | +import org.onosproject.pcepio.types.PcepValueType; |
24 | - | 24 | + |
25 | -/** | 25 | +/** |
26 | - * Abstraction of an entity providing PCEP LSPA Object. | 26 | + * Abstraction of an entity providing PCEP LSPA Object. |
27 | - */ | 27 | + */ |
28 | -public interface PcepLspaObject { | 28 | +public interface PcepLspaObject { |
29 | - | 29 | + |
30 | - /** | 30 | + /** |
31 | - * Returns L flag in LSPA Object. | 31 | + * Returns L flag in LSPA Object. |
32 | - * | 32 | + * |
33 | - * @return L flag in LSPA Object | 33 | + * @return L flag in LSPA Object |
34 | - */ | 34 | + */ |
35 | - boolean getLFlag(); | 35 | + boolean getLFlag(); |
36 | - | 36 | + |
37 | - /** | 37 | + /** |
38 | - * Sets L flag in LSPA Object. | 38 | + * Sets L flag in LSPA Object. |
39 | - * | 39 | + * |
40 | - * @param value L flag | 40 | + * @param value L flag |
41 | - */ | 41 | + */ |
42 | - void setLFlag(boolean value); | 42 | + void setLFlag(boolean value); |
43 | - | 43 | + |
44 | - /** | 44 | + /** |
45 | - * Returns Exclude Any field in LSPA Object. | 45 | + * Returns Exclude Any field in LSPA Object. |
46 | - * | 46 | + * |
47 | - * @return Exclude Any field in LSPA Object | 47 | + * @return Exclude Any field in LSPA Object |
48 | - */ | 48 | + */ |
49 | - int getExcludeAny(); | 49 | + int getExcludeAny(); |
50 | - | 50 | + |
51 | - /** | 51 | + /** |
52 | - * Sets Exclude Any field in LSPA Object. | 52 | + * Sets Exclude Any field in LSPA Object. |
53 | - * | 53 | + * |
54 | - * @param value Exclude Any field | 54 | + * @param value Exclude Any field |
55 | - */ | 55 | + */ |
56 | - void setExcludeAny(int value); | 56 | + void setExcludeAny(int value); |
57 | - | 57 | + |
58 | - /** | 58 | + /** |
59 | - * Returns Include Any field in LSPA Object. | 59 | + * Returns Include Any field in LSPA Object. |
60 | - * | 60 | + * |
61 | - * @return Include Any field in LSPA Object | 61 | + * @return Include Any field in LSPA Object |
62 | - */ | 62 | + */ |
63 | - int getIncludeAny(); | 63 | + int getIncludeAny(); |
64 | - | 64 | + |
65 | - /** | 65 | + /** |
66 | - * Sets Include Any field in LSPA Object. | 66 | + * Sets Include Any field in LSPA Object. |
67 | - * | 67 | + * |
68 | - * @param value Include Any field | 68 | + * @param value Include Any field |
69 | - */ | 69 | + */ |
70 | - void setIncludeAny(int value); | 70 | + void setIncludeAny(int value); |
71 | - | 71 | + |
72 | - /** | 72 | + /** |
73 | - * Returns Include All field in LSPA Object. | 73 | + * Returns Include All field in LSPA Object. |
74 | - * | 74 | + * |
75 | - * @return Include All field in LSPA Object | 75 | + * @return Include All field in LSPA Object |
76 | - */ | 76 | + */ |
77 | - int getIncludeAll(); | 77 | + int getIncludeAll(); |
78 | - | 78 | + |
79 | - /** | 79 | + /** |
80 | - * Sets Include All field in LSPA Object. | 80 | + * Sets Include All field in LSPA Object. |
81 | - * | 81 | + * |
82 | - * @param value Include All field | 82 | + * @param value Include All field |
83 | - */ | 83 | + */ |
84 | - void setIncludeAll(int value); | 84 | + void setIncludeAll(int value); |
85 | - | 85 | + |
86 | - /** | 86 | + /** |
87 | - * Returns Setup Priority field in LSPA Object. | 87 | + * Returns Setup Priority field in LSPA Object. |
88 | - * | 88 | + * |
89 | - * @return Setup Priority field in LSPA Object | 89 | + * @return Setup Priority field in LSPA Object |
90 | - */ | 90 | + */ |
91 | - byte getSetupPriority(); | 91 | + byte getSetupPriority(); |
92 | - | 92 | + |
93 | - /** | 93 | + /** |
94 | - * Sets Setup Priority field in LSPA Object. | 94 | + * Sets Setup Priority field in LSPA Object. |
95 | - * | 95 | + * |
96 | - * @param value Setup Priority field | 96 | + * @param value Setup Priority field |
97 | - */ | 97 | + */ |
98 | - void setSetupPriority(byte value); | 98 | + void setSetupPriority(byte value); |
99 | - | 99 | + |
100 | - /** | 100 | + /** |
101 | - * Returns Hold Priority field in LSPA Object. | 101 | + * Returns Hold Priority field in LSPA Object. |
102 | - * | 102 | + * |
103 | - * @return Hold Priority field in LSPA Object | 103 | + * @return Hold Priority field in LSPA Object |
104 | - */ | 104 | + */ |
105 | - byte getHoldPriority(); | 105 | + byte getHoldPriority(); |
106 | - | 106 | + |
107 | - /** | 107 | + /** |
108 | - * Sets Hold Priority field in LSPA Object. | 108 | + * Sets Hold Priority field in LSPA Object. |
109 | - * | 109 | + * |
110 | - * @param value Hold Priority field | 110 | + * @param value Hold Priority field |
111 | - */ | 111 | + */ |
112 | - void setHoldPriority(byte value); | 112 | + void setHoldPriority(byte value); |
113 | - | 113 | + |
114 | - /** | 114 | + /** |
115 | - * Returns list of Optional Tlvs in LSPA Object. | 115 | + * Returns list of Optional Tlvs in LSPA Object. |
116 | - * | 116 | + * |
117 | - * @return list of Optional Tlvs in LSPA Object | 117 | + * @return list of Optional Tlvs in LSPA Object |
118 | - */ | 118 | + */ |
119 | - LinkedList<PcepValueType> getOptionalTlv(); | 119 | + LinkedList<PcepValueType> getOptionalTlv(); |
120 | - | 120 | + |
121 | - /** | 121 | + /** |
122 | - * Sets Optional Tlvs in LSPA Object. | 122 | + * Sets Optional Tlvs in LSPA Object. |
123 | - * | 123 | + * |
124 | - * @param llOptionalTlv Optional Tlvs in LSPA Object | 124 | + * @param llOptionalTlv Optional Tlvs in LSPA Object |
125 | - */ | 125 | + */ |
126 | - void setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); | 126 | + void setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); |
127 | - | 127 | + |
128 | - /** | 128 | + /** |
129 | - * Prints attributes of LSPA object. | 129 | + * Prints attributes of LSPA object. |
130 | - */ | 130 | + */ |
131 | - void print(); | 131 | + void print(); |
132 | - | 132 | + |
133 | - /** | 133 | + /** |
134 | - * Writes the LSPA Object into channel buffer. | 134 | + * Writes the LSPA Object into channel buffer. |
135 | - * | 135 | + * |
136 | - * @param bb channel buffer | 136 | + * @param bb channel buffer |
137 | - * @return Returns the writerIndex of this buffer | 137 | + * @return Returns the writerIndex of this buffer |
138 | - * @throws PcepParseException while writing LSPA object into Channel Buffer. | 138 | + * @throws PcepParseException while writing LSPA object into Channel Buffer. |
139 | - */ | 139 | + */ |
140 | - int write(ChannelBuffer bb) throws PcepParseException; | 140 | + int write(ChannelBuffer bb) throws PcepParseException; |
141 | - | 141 | + |
142 | - /** | 142 | + /** |
143 | - * Builder interface with get and set functions to build bandwidth object. | 143 | + * Builder interface with get and set functions to build bandwidth object. |
144 | - */ | 144 | + */ |
145 | - public interface Builder { | 145 | + public interface Builder { |
146 | - | 146 | + |
147 | - /** | 147 | + /** |
148 | - * Builds LSPA Object. | 148 | + * Builds LSPA Object. |
149 | - * | 149 | + * |
150 | - * @return LSPA Object | 150 | + * @return LSPA Object |
151 | - * @throws PcepParseException while building LSPA object. | 151 | + * @throws PcepParseException while building LSPA object. |
152 | - */ | 152 | + */ |
153 | - PcepLspaObject build() throws PcepParseException; | 153 | + PcepLspaObject build() throws PcepParseException; |
154 | - | 154 | + |
155 | - /** | 155 | + /** |
156 | - * Returns LSPA object header. | 156 | + * Returns LSPA object header. |
157 | - * | 157 | + * |
158 | - * @return LSPA object header | 158 | + * @return LSPA object header |
159 | - */ | 159 | + */ |
160 | - PcepObjectHeader getLspaObjHeader(); | 160 | + PcepObjectHeader getLspaObjHeader(); |
161 | - | 161 | + |
162 | - /** | 162 | + /** |
163 | - * Sets LSPA object header and returns its builder. | 163 | + * Sets LSPA object header and returns its builder. |
164 | - * | 164 | + * |
165 | - * @param obj LSPA object header | 165 | + * @param obj LSPA object header |
166 | - * @return Builder by setting LSPA object header | 166 | + * @return Builder by setting LSPA object header |
167 | - */ | 167 | + */ |
168 | - Builder setLspaObjHeader(PcepObjectHeader obj); | 168 | + Builder setLspaObjHeader(PcepObjectHeader obj); |
169 | - | 169 | + |
170 | - /** | 170 | + /** |
171 | - * Returns L flag in LSPA Object. | 171 | + * Returns L flag in LSPA Object. |
172 | - * | 172 | + * |
173 | - * @return L flag in LSPA Object | 173 | + * @return L flag in LSPA Object |
174 | - */ | 174 | + */ |
175 | - boolean getLFlag(); | 175 | + boolean getLFlag(); |
176 | - | 176 | + |
177 | - /** | 177 | + /** |
178 | - * Sets L flag in LSPA Object and return its builder. | 178 | + * Sets L flag in LSPA Object and return its builder. |
179 | - * | 179 | + * |
180 | - * @param value L flag in LSPA Object | 180 | + * @param value L flag in LSPA Object |
181 | - * @return Builder by setting L flag | 181 | + * @return Builder by setting L flag |
182 | - */ | 182 | + */ |
183 | - Builder setLFlag(boolean value); | 183 | + Builder setLFlag(boolean value); |
184 | - | 184 | + |
185 | - /** | 185 | + /** |
186 | - * Returns Exclude Any field in LSPA Object. | 186 | + * Returns Exclude Any field in LSPA Object. |
187 | - * | 187 | + * |
188 | - * @return Exclude Any field in LSPA Object | 188 | + * @return Exclude Any field in LSPA Object |
189 | - */ | 189 | + */ |
190 | - int getExcludeAny(); | 190 | + int getExcludeAny(); |
191 | - | 191 | + |
192 | - /** | 192 | + /** |
193 | - * Sets Exclude Any field in LSPA Object and return its builder. | 193 | + * Sets Exclude Any field in LSPA Object and return its builder. |
194 | - * | 194 | + * |
195 | - * @param value Exclude Any field in LSPA Object | 195 | + * @param value Exclude Any field in LSPA Object |
196 | - * @return Builder by setting Exclude Any field | 196 | + * @return Builder by setting Exclude Any field |
197 | - */ | 197 | + */ |
198 | - Builder setExcludeAny(int value); | 198 | + Builder setExcludeAny(int value); |
199 | - | 199 | + |
200 | - /** | 200 | + /** |
201 | - * Returns Include Any field in LSPA Object. | 201 | + * Returns Include Any field in LSPA Object. |
202 | - * | 202 | + * |
203 | - * @return Include Any field in LSPA Object | 203 | + * @return Include Any field in LSPA Object |
204 | - */ | 204 | + */ |
205 | - int getIncludeAny(); | 205 | + int getIncludeAny(); |
206 | - | 206 | + |
207 | - /** | 207 | + /** |
208 | - * Sets Include Any field in LSPA Object and return its builder. | 208 | + * Sets Include Any field in LSPA Object and return its builder. |
209 | - * | 209 | + * |
210 | - * @param value Include Any field in LSPA Object | 210 | + * @param value Include Any field in LSPA Object |
211 | - * @return Builder by setting Include Any field | 211 | + * @return Builder by setting Include Any field |
212 | - */ | 212 | + */ |
213 | - Builder setIncludeAny(int value); | 213 | + Builder setIncludeAny(int value); |
214 | - | 214 | + |
215 | - /** | 215 | + /** |
216 | - * Returns Include All field in LSPA Object. | 216 | + * Returns Include All field in LSPA Object. |
217 | - * | 217 | + * |
218 | - * @return Include All field in LSPA Object | 218 | + * @return Include All field in LSPA Object |
219 | - */ | 219 | + */ |
220 | - int getIncludeAll(); | 220 | + int getIncludeAll(); |
221 | - | 221 | + |
222 | - /** | 222 | + /** |
223 | - * Sets Include All field in LSPA Object and return its builder. | 223 | + * Sets Include All field in LSPA Object and return its builder. |
224 | - * | 224 | + * |
225 | - * @param value Include All field in LSPA Object | 225 | + * @param value Include All field in LSPA Object |
226 | - * @return Builder by setting Include All field | 226 | + * @return Builder by setting Include All field |
227 | - */ | 227 | + */ |
228 | - Builder setIncludeAll(int value); | 228 | + Builder setIncludeAll(int value); |
229 | - | 229 | + |
230 | - /** | 230 | + /** |
231 | - * Returns Setup Priority field in LSPA Object. | 231 | + * Returns Setup Priority field in LSPA Object. |
232 | - * | 232 | + * |
233 | - * @return Setup Priority field in LSPA Object | 233 | + * @return Setup Priority field in LSPA Object |
234 | - */ | 234 | + */ |
235 | - byte getSetupPriority(); | 235 | + byte getSetupPriority(); |
236 | - | 236 | + |
237 | - /** | 237 | + /** |
238 | - * Sets Setup Priority field in LSPA Object and return its builder. | 238 | + * Sets Setup Priority field in LSPA Object and return its builder. |
239 | - * | 239 | + * |
240 | - * @param value Setup Priority field in LSPA Object | 240 | + * @param value Setup Priority field in LSPA Object |
241 | - * @return Builder by setting Setup Priority field | 241 | + * @return Builder by setting Setup Priority field |
242 | - */ | 242 | + */ |
243 | - Builder setSetupPriority(byte value); | 243 | + Builder setSetupPriority(byte value); |
244 | - | 244 | + |
245 | - /** | 245 | + /** |
246 | - * Returns Hold Priority field in LSPA Object. | 246 | + * Returns Hold Priority field in LSPA Object. |
247 | - * | 247 | + * |
248 | - * @return Hold Priority field in LSPA Object | 248 | + * @return Hold Priority field in LSPA Object |
249 | - */ | 249 | + */ |
250 | - byte getHoldPriority(); | 250 | + byte getHoldPriority(); |
251 | - | 251 | + |
252 | - /** | 252 | + /** |
253 | - * Sets Hold Priority field in LSPA Object and return its builder. | 253 | + * Sets Hold Priority field in LSPA Object and return its builder. |
254 | - * | 254 | + * |
255 | - * @param value Hold Priority field in LSPA Object | 255 | + * @param value Hold Priority field in LSPA Object |
256 | - * @return Builder by setting Hold Priority field | 256 | + * @return Builder by setting Hold Priority field |
257 | - */ | 257 | + */ |
258 | - Builder setHoldPriority(byte value); | 258 | + Builder setHoldPriority(byte value); |
259 | - | 259 | + |
260 | - /** | 260 | + /** |
261 | - * Returns list of Optional Tlvs in LSPA Object. | 261 | + * Returns list of Optional Tlvs in LSPA Object. |
262 | - * | 262 | + * |
263 | - * @return list of Optional Tlvs in LSPA Object | 263 | + * @return list of Optional Tlvs in LSPA Object |
264 | - */ | 264 | + */ |
265 | - LinkedList<PcepValueType> getOptionalTlv(); | 265 | + LinkedList<PcepValueType> getOptionalTlv(); |
266 | - | 266 | + |
267 | - /** | 267 | + /** |
268 | - * Sets list of Optional Tlvs in LSPA Object. | 268 | + * Sets list of Optional Tlvs in LSPA Object. |
269 | - * | 269 | + * |
270 | - * @param llOptionalTlv list of Optional Tlvs | 270 | + * @param llOptionalTlv list of Optional Tlvs |
271 | - * @return builder by setting list of Optional Tlvs | 271 | + * @return builder by setting list of Optional Tlvs |
272 | - */ | 272 | + */ |
273 | - Builder setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); | 273 | + Builder setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); |
274 | - | 274 | + |
275 | - /** | 275 | + /** |
276 | - * Sets P flag in LSPA object header and returns its builder. | 276 | + * Sets P flag in LSPA object header and returns its builder. |
277 | - * | 277 | + * |
278 | - * @param value boolean value to set P flag | 278 | + * @param value boolean value to set P flag |
279 | - * @return Builder by setting P flag | 279 | + * @return Builder by setting P flag |
280 | - */ | 280 | + */ |
281 | - Builder setPFlag(boolean value); | 281 | + Builder setPFlag(boolean value); |
282 | - | 282 | + |
283 | - /** | 283 | + /** |
284 | - * Sets I flag in LSPA object header and returns its builder. | 284 | + * Sets I flag in LSPA object header and returns its builder. |
285 | - * | 285 | + * |
286 | - * @param value boolean value to set I flag | 286 | + * @param value boolean value to set I flag |
287 | - * @return Builder by setting I flag | 287 | + * @return Builder by setting I flag |
288 | - */ | 288 | + */ |
289 | - Builder setIFlag(boolean value); | 289 | + Builder setIFlag(boolean value); |
290 | - } | 290 | + } |
291 | } | 291 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import org.jboss.netty.buffer.ChannelBuffer; | 18 | +import org.jboss.netty.buffer.ChannelBuffer; |
19 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 19 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
20 | -import org.onosproject.pcepio.types.PcepObjectHeader; | 20 | +import org.onosproject.pcepio.types.PcepObjectHeader; |
21 | - | 21 | + |
22 | -/** | 22 | +/** |
23 | - * Abstraction of an entity providing PCEP Metric Object. | 23 | + * Abstraction of an entity providing PCEP Metric Object. |
24 | - */ | 24 | + */ |
25 | -public interface PcepMetricObject { | 25 | +public interface PcepMetricObject { |
26 | - | 26 | + |
27 | - /** | 27 | + /** |
28 | - * Returns Metric value in Metric Object. | 28 | + * Returns Metric value in Metric Object. |
29 | - * | 29 | + * |
30 | - * @return Metric value | 30 | + * @return Metric value |
31 | - */ | 31 | + */ |
32 | - int getMetricVal(); | 32 | + int getMetricVal(); |
33 | - | 33 | + |
34 | - /** | 34 | + /** |
35 | - * Sets Metric value in Metric Object with specified value. | 35 | + * Sets Metric value in Metric Object with specified value. |
36 | - * | 36 | + * |
37 | - * @param value Metric value | 37 | + * @param value Metric value |
38 | - */ | 38 | + */ |
39 | - void setMetricVal(int value); | 39 | + void setMetricVal(int value); |
40 | - | 40 | + |
41 | - /** | 41 | + /** |
42 | - * Returns Y flag in Metric Object. | 42 | + * Returns Y flag in Metric Object. |
43 | - * | 43 | + * |
44 | - * @return Y flag in Metric Object | 44 | + * @return Y flag in Metric Object |
45 | - */ | 45 | + */ |
46 | - byte getYFlag(); | 46 | + byte getYFlag(); |
47 | - | 47 | + |
48 | - /** | 48 | + /** |
49 | - * Sets Y flag in Metric Object with specified value. | 49 | + * Sets Y flag in Metric Object with specified value. |
50 | - * | 50 | + * |
51 | - * @param value Y flag | 51 | + * @param value Y flag |
52 | - */ | 52 | + */ |
53 | - void setYFlag(byte value); | 53 | + void setYFlag(byte value); |
54 | - | 54 | + |
55 | - /** | 55 | + /** |
56 | - * Returns C flag in Metric Object. | 56 | + * Returns C flag in Metric Object. |
57 | - * | 57 | + * |
58 | - * @return C flag in Metric Object | 58 | + * @return C flag in Metric Object |
59 | - */ | 59 | + */ |
60 | - boolean getCFlag(); | 60 | + boolean getCFlag(); |
61 | - | 61 | + |
62 | - /** | 62 | + /** |
63 | - * Sets C flag in Metric Object with specified value. | 63 | + * Sets C flag in Metric Object with specified value. |
64 | - * | 64 | + * |
65 | - * @param value C flag | 65 | + * @param value C flag |
66 | - */ | 66 | + */ |
67 | - void setCFlag(boolean value); | 67 | + void setCFlag(boolean value); |
68 | - | 68 | + |
69 | - /** | 69 | + /** |
70 | - * Returns B flag in Metric Object. | 70 | + * Returns B flag in Metric Object. |
71 | - * | 71 | + * |
72 | - * @return B flag in Metric Object | 72 | + * @return B flag in Metric Object |
73 | - */ | 73 | + */ |
74 | - boolean getBFlag(); | 74 | + boolean getBFlag(); |
75 | - | 75 | + |
76 | - /** | 76 | + /** |
77 | - * Sets B flag in Metric Object with specified value. | 77 | + * Sets B flag in Metric Object with specified value. |
78 | - * | 78 | + * |
79 | - * @param value B flag | 79 | + * @param value B flag |
80 | - */ | 80 | + */ |
81 | - void setBFlag(boolean value); | 81 | + void setBFlag(boolean value); |
82 | - | 82 | + |
83 | - /** | 83 | + /** |
84 | - * Returns BType field in Metric Object. | 84 | + * Returns BType field in Metric Object. |
85 | - * | 85 | + * |
86 | - * @return BType field in Metric Object | 86 | + * @return BType field in Metric Object |
87 | - */ | 87 | + */ |
88 | - byte getBType(); | 88 | + byte getBType(); |
89 | - | 89 | + |
90 | - /** | 90 | + /** |
91 | - * Sets BType field in Metric Object with specified value. | 91 | + * Sets BType field in Metric Object with specified value. |
92 | - * | 92 | + * |
93 | - * @param value BType field | 93 | + * @param value BType field |
94 | - */ | 94 | + */ |
95 | - void setBType(byte value); | 95 | + void setBType(byte value); |
96 | - | 96 | + |
97 | - /** | 97 | + /** |
98 | - * Prints attributes of Metric object. | 98 | + * Prints attributes of Metric object. |
99 | - */ | 99 | + */ |
100 | - void print(); | 100 | + void print(); |
101 | - | 101 | + |
102 | - /** | 102 | + /** |
103 | - * Writes the Metric Object into channel buffer. | 103 | + * Writes the Metric Object into channel buffer. |
104 | - * | 104 | + * |
105 | - * @param bb channel buffer | 105 | + * @param bb channel buffer |
106 | - * @return Returns the writerIndex of this buffer | 106 | + * @return Returns the writerIndex of this buffer |
107 | - * @throws PcepParseException while writing METRIC object into Channel Buffer. | 107 | + * @throws PcepParseException while writing METRIC object into Channel Buffer. |
108 | - */ | 108 | + */ |
109 | - int write(ChannelBuffer bb) throws PcepParseException; | 109 | + int write(ChannelBuffer bb) throws PcepParseException; |
110 | - | 110 | + |
111 | - /** | 111 | + /** |
112 | - * Builder interface with get and set functions to build Metric object. | 112 | + * Builder interface with get and set functions to build Metric object. |
113 | - */ | 113 | + */ |
114 | - public interface Builder { | 114 | + public interface Builder { |
115 | - | 115 | + |
116 | - /** | 116 | + /** |
117 | - * Builds Metric Object. | 117 | + * Builds Metric Object. |
118 | - * | 118 | + * |
119 | - * @return Metric Object | 119 | + * @return Metric Object |
120 | - * @throws PcepParseException when mandatory object is not set | 120 | + * @throws PcepParseException when mandatory object is not set |
121 | - */ | 121 | + */ |
122 | - PcepMetricObject build() throws PcepParseException; | 122 | + PcepMetricObject build() throws PcepParseException; |
123 | - | 123 | + |
124 | - /** | 124 | + /** |
125 | - * Returns Metric object header. | 125 | + * Returns Metric object header. |
126 | - * | 126 | + * |
127 | - * @return Metric object header | 127 | + * @return Metric object header |
128 | - */ | 128 | + */ |
129 | - PcepObjectHeader getMetricObjHeader(); | 129 | + PcepObjectHeader getMetricObjHeader(); |
130 | - | 130 | + |
131 | - /** | 131 | + /** |
132 | - * Sets Metric object header and returns its builder. | 132 | + * Sets Metric object header and returns its builder. |
133 | - * | 133 | + * |
134 | - * @param obj Metric object header | 134 | + * @param obj Metric object header |
135 | - * @return Builder by setting Metric object header | 135 | + * @return Builder by setting Metric object header |
136 | - */ | 136 | + */ |
137 | - Builder setMetricObjHeader(PcepObjectHeader obj); | 137 | + Builder setMetricObjHeader(PcepObjectHeader obj); |
138 | - | 138 | + |
139 | - /** | 139 | + /** |
140 | - * Returns Metric value in Metric Object. | 140 | + * Returns Metric value in Metric Object. |
141 | - * | 141 | + * |
142 | - * @return Metric value | 142 | + * @return Metric value |
143 | - */ | 143 | + */ |
144 | - int getMetricVal(); | 144 | + int getMetricVal(); |
145 | - | 145 | + |
146 | - /** | 146 | + /** |
147 | - * Sets Metric Value in Metric Object and returns its builder. | 147 | + * Sets Metric Value in Metric Object and returns its builder. |
148 | - * | 148 | + * |
149 | - * @param value Metric Value | 149 | + * @param value Metric Value |
150 | - * @return Builder by setting Metric Value | 150 | + * @return Builder by setting Metric Value |
151 | - */ | 151 | + */ |
152 | - Builder setMetricVal(int value); | 152 | + Builder setMetricVal(int value); |
153 | - | 153 | + |
154 | - /** | 154 | + /** |
155 | - * Returns Flags in Metric Object. | 155 | + * Returns Flags in Metric Object. |
156 | - * | 156 | + * |
157 | - * @return Flags in Metric Object | 157 | + * @return Flags in Metric Object |
158 | - */ | 158 | + */ |
159 | - byte getYFlag(); | 159 | + byte getYFlag(); |
160 | - | 160 | + |
161 | - /** | 161 | + /** |
162 | - * Sets Flags in Metric Object and returns its builder. | 162 | + * Sets Flags in Metric Object and returns its builder. |
163 | - * | 163 | + * |
164 | - * @param value Flags | 164 | + * @param value Flags |
165 | - * @return Builder by setting Flags | 165 | + * @return Builder by setting Flags |
166 | - */ | 166 | + */ |
167 | - Builder setYFlag(byte value); | 167 | + Builder setYFlag(byte value); |
168 | - | 168 | + |
169 | - /** | 169 | + /** |
170 | - * Returns C flag in Metric Object. | 170 | + * Returns C flag in Metric Object. |
171 | - * | 171 | + * |
172 | - * @return C flag in Metric Object | 172 | + * @return C flag in Metric Object |
173 | - */ | 173 | + */ |
174 | - boolean getCFlag(); | 174 | + boolean getCFlag(); |
175 | - | 175 | + |
176 | - /** | 176 | + /** |
177 | - * Sets C flag in Metric Object and returns its builder. | 177 | + * Sets C flag in Metric Object and returns its builder. |
178 | - * | 178 | + * |
179 | - * @param value C flag | 179 | + * @param value C flag |
180 | - * @return Builder by setting C flag | 180 | + * @return Builder by setting C flag |
181 | - */ | 181 | + */ |
182 | - Builder setCFlag(boolean value); | 182 | + Builder setCFlag(boolean value); |
183 | - | 183 | + |
184 | - /** | 184 | + /** |
185 | - * Returns B flag in Metric Object. | 185 | + * Returns B flag in Metric Object. |
186 | - * | 186 | + * |
187 | - * @return B flag in Metric Object | 187 | + * @return B flag in Metric Object |
188 | - */ | 188 | + */ |
189 | - boolean getBFlag(); | 189 | + boolean getBFlag(); |
190 | - | 190 | + |
191 | - /** | 191 | + /** |
192 | - * Sets B flag in Metric Object and returns its builder. | 192 | + * Sets B flag in Metric Object and returns its builder. |
193 | - * | 193 | + * |
194 | - * @param value B flag | 194 | + * @param value B flag |
195 | - * @return Builder by setting B flag | 195 | + * @return Builder by setting B flag |
196 | - */ | 196 | + */ |
197 | - Builder setBFlag(boolean value); | 197 | + Builder setBFlag(boolean value); |
198 | - | 198 | + |
199 | - /** | 199 | + /** |
200 | - * Returns BType field in Metric Object. | 200 | + * Returns BType field in Metric Object. |
201 | - * | 201 | + * |
202 | - * @return BType field in Metric Object | 202 | + * @return BType field in Metric Object |
203 | - */ | 203 | + */ |
204 | - byte getBType(); | 204 | + byte getBType(); |
205 | - | 205 | + |
206 | - /** | 206 | + /** |
207 | - * Sets B Type field in Metric Object and returns its builder. | 207 | + * Sets B Type field in Metric Object and returns its builder. |
208 | - * | 208 | + * |
209 | - * @param value B Type field | 209 | + * @param value B Type field |
210 | - * @return Builder by setting B Type field | 210 | + * @return Builder by setting B Type field |
211 | - */ | 211 | + */ |
212 | - Builder setBType(byte value); | 212 | + Builder setBType(byte value); |
213 | - | 213 | + |
214 | - /** | 214 | + /** |
215 | - * Sets P flag in Metric object header and returns its builder. | 215 | + * Sets P flag in Metric object header and returns its builder. |
216 | - * | 216 | + * |
217 | - * @param value boolean value to set P flag | 217 | + * @param value boolean value to set P flag |
218 | - * @return Builder by setting P flag | 218 | + * @return Builder by setting P flag |
219 | - */ | 219 | + */ |
220 | - Builder setPFlag(boolean value); | 220 | + Builder setPFlag(boolean value); |
221 | - | 221 | + |
222 | - /** | 222 | + /** |
223 | - * Sets I flag in Metric object header and returns its builder. | 223 | + * Sets I flag in Metric object header and returns its builder. |
224 | - * | 224 | + * |
225 | - * @param value boolean value to set I flag | 225 | + * @param value boolean value to set I flag |
226 | - * @return Builder by setting I flag | 226 | + * @return Builder by setting I flag |
227 | - */ | 227 | + */ |
228 | - Builder setIFlag(boolean value); | 228 | + Builder setIFlag(boolean value); |
229 | - } | 229 | + } |
230 | -} | 230 | +} | ... | ... |
1 | -package org.onosproject.pcepio.protocol; | 1 | +package org.onosproject.pcepio.protocol; |
2 | - | 2 | + |
3 | -import org.jboss.netty.buffer.ChannelBuffer; | 3 | +import org.jboss.netty.buffer.ChannelBuffer; |
4 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 4 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
5 | - | 5 | + |
6 | -/** | 6 | +/** |
7 | - * Abstraction of an entity Provides PCEP Message PAth for update message. | 7 | + * Abstraction of an entity Provides PCEP Message PAth for update message. |
8 | - * Reference :PCE extensions for stateful draft-ietf-pce-stateful-pce-10. | 8 | + * Reference :PCE extensions for stateful draft-ietf-pce-stateful-pce-10. |
9 | - */ | 9 | + */ |
10 | -public interface PcepMsgPath { | 10 | +public interface PcepMsgPath { |
11 | - | 11 | + |
12 | - /** | 12 | + /** |
13 | - * Returns object of PcepEroObject. | 13 | + * Returns object of PcepEroObject. |
14 | - * | 14 | + * |
15 | - * @return eroObject | 15 | + * @return eroObject |
16 | - */ | 16 | + */ |
17 | - PcepEroObject getEroObject(); | 17 | + PcepEroObject getEroObject(); |
18 | - | 18 | + |
19 | - /** | 19 | + /** |
20 | - * Returns object of PcepAttribute. | 20 | + * Returns object of PcepAttribute. |
21 | - * | 21 | + * |
22 | - * @return pcepAttribute | 22 | + * @return pcepAttribute |
23 | - */ | 23 | + */ |
24 | - PcepAttribute getPcepAttribute(); | 24 | + PcepAttribute getPcepAttribute(); |
25 | - | 25 | + |
26 | - /** | 26 | + /** |
27 | - * Sets PcepEroObject. | 27 | + * Sets PcepEroObject. |
28 | - * | 28 | + * |
29 | - * @param eroObject PCEP ERO Object. | 29 | + * @param eroObject PCEP ERO Object. |
30 | - */ | 30 | + */ |
31 | - void setEroObject(PcepEroObject eroObject); | 31 | + void setEroObject(PcepEroObject eroObject); |
32 | - | 32 | + |
33 | - /** | 33 | + /** |
34 | - * Sets PcepAttribute. | 34 | + * Sets PcepAttribute. |
35 | - * | 35 | + * |
36 | - * @param pcepAttribute PCEP-Attribute. | 36 | + * @param pcepAttribute PCEP-Attribute. |
37 | - */ | 37 | + */ |
38 | - void setPcepAttribute(PcepAttribute pcepAttribute); | 38 | + void setPcepAttribute(PcepAttribute pcepAttribute); |
39 | - | 39 | + |
40 | - /** | 40 | + /** |
41 | - * reads ERO object and attribute list. | 41 | + * reads ERO object and attribute list. |
42 | - * | 42 | + * |
43 | - * @param bb of type channel buffer | 43 | + * @param bb of type channel buffer |
44 | - * @return PcepMsgPath | 44 | + * @return PcepMsgPath |
45 | - * @throws PcepParseException while parsing Message Path from Channel Buffer. | 45 | + * @throws PcepParseException while parsing Message Path from Channel Buffer. |
46 | - */ | 46 | + */ |
47 | - public PcepMsgPath read(ChannelBuffer bb) throws PcepParseException; | 47 | + public PcepMsgPath read(ChannelBuffer bb) throws PcepParseException; |
48 | - | 48 | + |
49 | - /** | 49 | + /** |
50 | - * writes ERO object and attribute list to channel. | 50 | + * writes ERO object and attribute list to channel. |
51 | - * | 51 | + * |
52 | - * @param bb of type channel buffer | 52 | + * @param bb of type channel buffer |
53 | - * @return object length index | 53 | + * @return object length index |
54 | - * @throws PcepParseException while writing Message Path into Channel Buffer. | 54 | + * @throws PcepParseException while writing Message Path into Channel Buffer. |
55 | - */ | 55 | + */ |
56 | - | 56 | + |
57 | - public int write(ChannelBuffer bb) throws PcepParseException; | 57 | + public int write(ChannelBuffer bb) throws PcepParseException; |
58 | - | 58 | + |
59 | - /** | 59 | + /** |
60 | - * Prints the attributes of PCEP message path. | 60 | + * Prints the attributes of PCEP message path. |
61 | - */ | 61 | + */ |
62 | - void print(); | 62 | + void print(); |
63 | - | 63 | + |
64 | - /** | 64 | + /** |
65 | - * Builder interface with get and set functions to build PcepMsgPath. | 65 | + * Builder interface with get and set functions to build PcepMsgPath. |
66 | - */ | 66 | + */ |
67 | - public interface Builder { | 67 | + public interface Builder { |
68 | - | 68 | + |
69 | - /** | 69 | + /** |
70 | - * Builds PcepMsgPath. | 70 | + * Builds PcepMsgPath. |
71 | - * | 71 | + * |
72 | - * @return PcepMsgPath | 72 | + * @return PcepMsgPath |
73 | - * @throws PcepParseException when mandatory object is not set | 73 | + * @throws PcepParseException when mandatory object is not set |
74 | - */ | 74 | + */ |
75 | - PcepMsgPath build() throws PcepParseException; | 75 | + PcepMsgPath build() throws PcepParseException; |
76 | - | 76 | + |
77 | - /** | 77 | + /** |
78 | - * Returns object of PcepEroObject. | 78 | + * Returns object of PcepEroObject. |
79 | - * | 79 | + * |
80 | - * @return PcepEroObject | 80 | + * @return PcepEroObject |
81 | - */ | 81 | + */ |
82 | - PcepEroObject getEroObject(); | 82 | + PcepEroObject getEroObject(); |
83 | - | 83 | + |
84 | - /** | 84 | + /** |
85 | - * Returns object of PcepAttribute. | 85 | + * Returns object of PcepAttribute. |
86 | - * | 86 | + * |
87 | - * @return pcepAttribute | 87 | + * @return pcepAttribute |
88 | - */ | 88 | + */ |
89 | - PcepAttribute getPcepAttribute(); | 89 | + PcepAttribute getPcepAttribute(); |
90 | - | 90 | + |
91 | - /** | 91 | + /** |
92 | - * Sets PcepEroObject. | 92 | + * Sets PcepEroObject. |
93 | - * | 93 | + * |
94 | - * @param eroObject PcepEroObject | 94 | + * @param eroObject PcepEroObject |
95 | - * @return Builder by setting ERO object. | 95 | + * @return Builder by setting ERO object. |
96 | - */ | 96 | + */ |
97 | - Builder setEroObject(PcepEroObject eroObject); | 97 | + Builder setEroObject(PcepEroObject eroObject); |
98 | - | 98 | + |
99 | - /** | 99 | + /** |
100 | - * Sets PcepAttribute. | 100 | + * Sets PcepAttribute. |
101 | - * | 101 | + * |
102 | - * @param pcepAttribute PCEP-Attribute | 102 | + * @param pcepAttribute PCEP-Attribute |
103 | - * @return Builder by setting PCEP-Attribute. | 103 | + * @return Builder by setting PCEP-Attribute. |
104 | - */ | 104 | + */ |
105 | - Builder setPcepAttribute(PcepAttribute pcepAttribute); | 105 | + Builder setPcepAttribute(PcepAttribute pcepAttribute); |
106 | - } | 106 | + } |
107 | -} | 107 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | - | 16 | + |
17 | -package org.onosproject.pcepio.protocol; | 17 | +package org.onosproject.pcepio.protocol; |
18 | - | 18 | + |
19 | -import org.jboss.netty.buffer.ChannelBuffer; | 19 | +import org.jboss.netty.buffer.ChannelBuffer; |
20 | - | 20 | + |
21 | -/** | 21 | +/** |
22 | - * Abstraction of an entity provides NAI information in SR ERO Object. | 22 | + * Abstraction of an entity provides NAI information in SR ERO Object. |
23 | - */ | 23 | + */ |
24 | -public interface PcepNai { | 24 | +public interface PcepNai { |
25 | - | 25 | + |
26 | - /** | 26 | + /** |
27 | - * To get the ST type of the NAI information. | 27 | + * To get the ST type of the NAI information. |
28 | - * | 28 | + * |
29 | - * @return type of ST info | 29 | + * @return type of ST info |
30 | - */ | 30 | + */ |
31 | - byte getType(); | 31 | + byte getType(); |
32 | - | 32 | + |
33 | - /** | 33 | + /** |
34 | - * To write the object information to channelBuffer. | 34 | + * To write the object information to channelBuffer. |
35 | - * | 35 | + * |
36 | - * @param cb of type channel buffer | 36 | + * @param cb of type channel buffer |
37 | - * @return length of written bytes. | 37 | + * @return length of written bytes. |
38 | - */ | 38 | + */ |
39 | - int write(ChannelBuffer cb); | 39 | + int write(ChannelBuffer cb); |
40 | -} | 40 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import java.util.LinkedList; | 18 | +import java.util.LinkedList; |
19 | - | 19 | + |
20 | -import org.jboss.netty.buffer.ChannelBuffer; | 20 | +import org.jboss.netty.buffer.ChannelBuffer; |
21 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 21 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
22 | -import org.onosproject.pcepio.types.PcepObjectHeader; | 22 | +import org.onosproject.pcepio.types.PcepObjectHeader; |
23 | -import org.onosproject.pcepio.types.PcepValueType; | 23 | +import org.onosproject.pcepio.types.PcepValueType; |
24 | - | 24 | + |
25 | -/** | 25 | +/** |
26 | - * Abstraction of an entity providing PCEP RP Object. | 26 | + * Abstraction of an entity providing PCEP RP Object. |
27 | - */ | 27 | + */ |
28 | -public interface PcepRPObject { | 28 | +public interface PcepRPObject { |
29 | - | 29 | + |
30 | - /** | 30 | + /** |
31 | - * Returns RequestId Number in RP Object. | 31 | + * Returns RequestId Number in RP Object. |
32 | - * | 32 | + * |
33 | - * @return RequestId Number in RP Object | 33 | + * @return RequestId Number in RP Object |
34 | - */ | 34 | + */ |
35 | - int getRequestIdNum(); | 35 | + int getRequestIdNum(); |
36 | - | 36 | + |
37 | - /** | 37 | + /** |
38 | - * Sets RequestId Number with specified value. | 38 | + * Sets RequestId Number with specified value. |
39 | - * | 39 | + * |
40 | - * @param value RequestId Number | 40 | + * @param value RequestId Number |
41 | - */ | 41 | + */ |
42 | - void setRequestIdNum(int value); | 42 | + void setRequestIdNum(int value); |
43 | - | 43 | + |
44 | - /** | 44 | + /** |
45 | - * Returns O flag in RP Object. | 45 | + * Returns O flag in RP Object. |
46 | - * | 46 | + * |
47 | - * @return O flag in RP Object | 47 | + * @return O flag in RP Object |
48 | - */ | 48 | + */ |
49 | - boolean getOFlag(); | 49 | + boolean getOFlag(); |
50 | - | 50 | + |
51 | - /** | 51 | + /** |
52 | - * Sets O flag with specified value. | 52 | + * Sets O flag with specified value. |
53 | - * | 53 | + * |
54 | - * @param value O flag | 54 | + * @param value O flag |
55 | - */ | 55 | + */ |
56 | - void setOFlag(boolean value); | 56 | + void setOFlag(boolean value); |
57 | - | 57 | + |
58 | - /** | 58 | + /** |
59 | - * Returns B flag in RP Object. | 59 | + * Returns B flag in RP Object. |
60 | - * | 60 | + * |
61 | - * @return B flag in RP Object | 61 | + * @return B flag in RP Object |
62 | - */ | 62 | + */ |
63 | - boolean getBFlag(); | 63 | + boolean getBFlag(); |
64 | - | 64 | + |
65 | - /** | 65 | + /** |
66 | - * Sets B flag with specified value. | 66 | + * Sets B flag with specified value. |
67 | - * | 67 | + * |
68 | - * @param value B flag | 68 | + * @param value B flag |
69 | - */ | 69 | + */ |
70 | - void setBFlag(boolean value); | 70 | + void setBFlag(boolean value); |
71 | - | 71 | + |
72 | - /** | 72 | + /** |
73 | - * Returns R flag in RP Object. | 73 | + * Returns R flag in RP Object. |
74 | - * | 74 | + * |
75 | - * @return R flag in RP Object | 75 | + * @return R flag in RP Object |
76 | - */ | 76 | + */ |
77 | - boolean getRFlag(); | 77 | + boolean getRFlag(); |
78 | - | 78 | + |
79 | - /** | 79 | + /** |
80 | - * Sets R flag with specified value. | 80 | + * Sets R flag with specified value. |
81 | - * | 81 | + * |
82 | - * @param value R flag | 82 | + * @param value R flag |
83 | - */ | 83 | + */ |
84 | - void setRFlag(boolean value); | 84 | + void setRFlag(boolean value); |
85 | - | 85 | + |
86 | - /** | 86 | + /** |
87 | - * Returns Priority Flag in RP Object. | 87 | + * Returns Priority Flag in RP Object. |
88 | - * | 88 | + * |
89 | - * @return Priority Flag in RP Object | 89 | + * @return Priority Flag in RP Object |
90 | - */ | 90 | + */ |
91 | - byte getPriFlag(); | 91 | + byte getPriFlag(); |
92 | - | 92 | + |
93 | - /** | 93 | + /** |
94 | - * Sets Priority Flag with specified value. | 94 | + * Sets Priority Flag with specified value. |
95 | - * | 95 | + * |
96 | - * @param value Priority Flag | 96 | + * @param value Priority Flag |
97 | - */ | 97 | + */ |
98 | - void setPriFlag(byte value); | 98 | + void setPriFlag(byte value); |
99 | - | 99 | + |
100 | - /** | 100 | + /** |
101 | - * Returns list of Optional Tlvs in RP Object. | 101 | + * Returns list of Optional Tlvs in RP Object. |
102 | - * | 102 | + * |
103 | - * @return list of Optional Tlvs in RP Object | 103 | + * @return list of Optional Tlvs in RP Object |
104 | - */ | 104 | + */ |
105 | - LinkedList<PcepValueType> getOptionalTlv(); | 105 | + LinkedList<PcepValueType> getOptionalTlv(); |
106 | - | 106 | + |
107 | - /** | 107 | + /** |
108 | - * Sets list of Optional Tlvs in RP Object and returns its builder. | 108 | + * Sets list of Optional Tlvs in RP Object and returns its builder. |
109 | - * | 109 | + * |
110 | - * @param llOptionalTlv list of Optional Tlvs | 110 | + * @param llOptionalTlv list of Optional Tlvs |
111 | - */ | 111 | + */ |
112 | - void setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); | 112 | + void setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); |
113 | - | 113 | + |
114 | - /** | 114 | + /** |
115 | - * Prints attributes of RP object. | 115 | + * Prints attributes of RP object. |
116 | - */ | 116 | + */ |
117 | - void print(); | 117 | + void print(); |
118 | - | 118 | + |
119 | - /** | 119 | + /** |
120 | - * Writes the RP Object into channel buffer. | 120 | + * Writes the RP Object into channel buffer. |
121 | - * | 121 | + * |
122 | - * @param bb channel buffer | 122 | + * @param bb channel buffer |
123 | - * @return Returns the writerIndex of this buffer | 123 | + * @return Returns the writerIndex of this buffer |
124 | - * @throws PcepParseException while writing RP object into Channel Buffer. | 124 | + * @throws PcepParseException while writing RP object into Channel Buffer. |
125 | - */ | 125 | + */ |
126 | - int write(ChannelBuffer bb) throws PcepParseException; | 126 | + int write(ChannelBuffer bb) throws PcepParseException; |
127 | - | 127 | + |
128 | - /** | 128 | + /** |
129 | - * Builder interface with get and set functions to build bandwidth object. | 129 | + * Builder interface with get and set functions to build bandwidth object. |
130 | - */ | 130 | + */ |
131 | - public interface Builder { | 131 | + public interface Builder { |
132 | - | 132 | + |
133 | - /** | 133 | + /** |
134 | - * Builds RP Object. | 134 | + * Builds RP Object. |
135 | - * | 135 | + * |
136 | - * @return RP Object | 136 | + * @return RP Object |
137 | - */ | 137 | + */ |
138 | - PcepRPObject build(); | 138 | + PcepRPObject build(); |
139 | - | 139 | + |
140 | - /** | 140 | + /** |
141 | - * Returns RP object header. | 141 | + * Returns RP object header. |
142 | - * | 142 | + * |
143 | - * @return RP object header | 143 | + * @return RP object header |
144 | - */ | 144 | + */ |
145 | - PcepObjectHeader getRPObjHeader(); | 145 | + PcepObjectHeader getRPObjHeader(); |
146 | - | 146 | + |
147 | - /** | 147 | + /** |
148 | - * Sets RP object header and returns its builder. | 148 | + * Sets RP object header and returns its builder. |
149 | - * | 149 | + * |
150 | - * @param obj RP object header | 150 | + * @param obj RP object header |
151 | - * @return Builder by setting RP object header | 151 | + * @return Builder by setting RP object header |
152 | - */ | 152 | + */ |
153 | - Builder setRPObjHeader(PcepObjectHeader obj); | 153 | + Builder setRPObjHeader(PcepObjectHeader obj); |
154 | - | 154 | + |
155 | - /** | 155 | + /** |
156 | - * Returns Request Id Number in RP Object. | 156 | + * Returns Request Id Number in RP Object. |
157 | - * | 157 | + * |
158 | - * @return Request Id Number in RP Object | 158 | + * @return Request Id Number in RP Object |
159 | - */ | 159 | + */ |
160 | - int getRequestIdNum(); | 160 | + int getRequestIdNum(); |
161 | - | 161 | + |
162 | - /** | 162 | + /** |
163 | - * Sets Request Id Number and returns its builder. | 163 | + * Sets Request Id Number and returns its builder. |
164 | - * | 164 | + * |
165 | - * @param value Request Id Number | 165 | + * @param value Request Id Number |
166 | - * @return Builder by setting Request Id Number | 166 | + * @return Builder by setting Request Id Number |
167 | - */ | 167 | + */ |
168 | - Builder setRequestIdNum(int value); | 168 | + Builder setRequestIdNum(int value); |
169 | - | 169 | + |
170 | - /** | 170 | + /** |
171 | - * Returns O flag in RP Object. | 171 | + * Returns O flag in RP Object. |
172 | - * | 172 | + * |
173 | - * @return O flag in RP Object | 173 | + * @return O flag in RP Object |
174 | - */ | 174 | + */ |
175 | - boolean getOFlag(); | 175 | + boolean getOFlag(); |
176 | - | 176 | + |
177 | - /** | 177 | + /** |
178 | - * Sets O flag and returns its builder. | 178 | + * Sets O flag and returns its builder. |
179 | - * | 179 | + * |
180 | - * @param value O flag | 180 | + * @param value O flag |
181 | - * @return Builder by setting O flag | 181 | + * @return Builder by setting O flag |
182 | - */ | 182 | + */ |
183 | - Builder setOFlag(boolean value); | 183 | + Builder setOFlag(boolean value); |
184 | - | 184 | + |
185 | - /** | 185 | + /** |
186 | - * Returns B flag in RP Object. | 186 | + * Returns B flag in RP Object. |
187 | - * | 187 | + * |
188 | - * @return B flag in RP Object | 188 | + * @return B flag in RP Object |
189 | - */ | 189 | + */ |
190 | - boolean getBFlag(); | 190 | + boolean getBFlag(); |
191 | - | 191 | + |
192 | - /** | 192 | + /** |
193 | - * Sets B flag and returns its builder. | 193 | + * Sets B flag and returns its builder. |
194 | - * | 194 | + * |
195 | - * @param value B flag | 195 | + * @param value B flag |
196 | - * @return Builder by setting B flag | 196 | + * @return Builder by setting B flag |
197 | - */ | 197 | + */ |
198 | - Builder setBFlag(boolean value); | 198 | + Builder setBFlag(boolean value); |
199 | - | 199 | + |
200 | - /** | 200 | + /** |
201 | - * Returns R flag in RP Object. | 201 | + * Returns R flag in RP Object. |
202 | - * | 202 | + * |
203 | - * @return R flag in RP Object | 203 | + * @return R flag in RP Object |
204 | - */ | 204 | + */ |
205 | - boolean getRFlag(); | 205 | + boolean getRFlag(); |
206 | - | 206 | + |
207 | - /** | 207 | + /** |
208 | - * Sets R flag and returns its builder. | 208 | + * Sets R flag and returns its builder. |
209 | - * | 209 | + * |
210 | - * @param value R flag | 210 | + * @param value R flag |
211 | - * @return Builder by setting R flag | 211 | + * @return Builder by setting R flag |
212 | - */ | 212 | + */ |
213 | - Builder setRFlag(boolean value); | 213 | + Builder setRFlag(boolean value); |
214 | - | 214 | + |
215 | - /** | 215 | + /** |
216 | - * Returns Priority Flag in RP Object. | 216 | + * Returns Priority Flag in RP Object. |
217 | - * | 217 | + * |
218 | - * @return Priority Flag in RP Object | 218 | + * @return Priority Flag in RP Object |
219 | - */ | 219 | + */ |
220 | - byte getPriFlag(); | 220 | + byte getPriFlag(); |
221 | - | 221 | + |
222 | - /** | 222 | + /** |
223 | - * Sets Priority Flag and returns its builder. | 223 | + * Sets Priority Flag and returns its builder. |
224 | - * | 224 | + * |
225 | - * @param value Priority Flag | 225 | + * @param value Priority Flag |
226 | - * @return Builder by setting Priority Flag | 226 | + * @return Builder by setting Priority Flag |
227 | - */ | 227 | + */ |
228 | - Builder setPriFlag(byte value); | 228 | + Builder setPriFlag(byte value); |
229 | - | 229 | + |
230 | - /** | 230 | + /** |
231 | - * Returns list of Optional Tlvs in RP Object. | 231 | + * Returns list of Optional Tlvs in RP Object. |
232 | - * | 232 | + * |
233 | - * @return list of Optional Tlvs | 233 | + * @return list of Optional Tlvs |
234 | - */ | 234 | + */ |
235 | - LinkedList<PcepValueType> getOptionalTlv(); | 235 | + LinkedList<PcepValueType> getOptionalTlv(); |
236 | - | 236 | + |
237 | - /** | 237 | + /** |
238 | - * Sets list of Optional Tlvs and returns its builder. | 238 | + * Sets list of Optional Tlvs and returns its builder. |
239 | - * | 239 | + * |
240 | - * @param llOptionalTlv list of Optional Tlvs | 240 | + * @param llOptionalTlv list of Optional Tlvs |
241 | - * @return Builder by setting list of Optional Tlvs | 241 | + * @return Builder by setting list of Optional Tlvs |
242 | - */ | 242 | + */ |
243 | - Builder setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); | 243 | + Builder setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); |
244 | - | 244 | + |
245 | - /** | 245 | + /** |
246 | - * Sets P flag in RP object header and returns its builder. | 246 | + * Sets P flag in RP object header and returns its builder. |
247 | - * | 247 | + * |
248 | - * @param value boolean value to set P flag | 248 | + * @param value boolean value to set P flag |
249 | - * @return Builder by setting P flag | 249 | + * @return Builder by setting P flag |
250 | - */ | 250 | + */ |
251 | - Builder setPFlag(boolean value); | 251 | + Builder setPFlag(boolean value); |
252 | - | 252 | + |
253 | - /** | 253 | + /** |
254 | - * Sets I flag in RP object header and returns its builder. | 254 | + * Sets I flag in RP object header and returns its builder. |
255 | - * | 255 | + * |
256 | - * @param value boolean value to set I flag | 256 | + * @param value boolean value to set I flag |
257 | - * @return Builder by setting I flag | 257 | + * @return Builder by setting I flag |
258 | - */ | 258 | + */ |
259 | - Builder setIFlag(boolean value); | 259 | + Builder setIFlag(boolean value); |
260 | - } | 260 | + } |
261 | -} | 261 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import java.util.LinkedList; | 18 | +import java.util.LinkedList; |
19 | - | 19 | + |
20 | -import org.jboss.netty.buffer.ChannelBuffer; | 20 | +import org.jboss.netty.buffer.ChannelBuffer; |
21 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 21 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
22 | -import org.onosproject.pcepio.types.PcepObjectHeader; | 22 | +import org.onosproject.pcepio.types.PcepObjectHeader; |
23 | -import org.onosproject.pcepio.types.PcepValueType; | 23 | +import org.onosproject.pcepio.types.PcepValueType; |
24 | - | 24 | + |
25 | -/** | 25 | +/** |
26 | - * Abstraction of an entity providing PCEP RRO Object. | 26 | + * Abstraction of an entity providing PCEP RRO Object. |
27 | - */ | 27 | + */ |
28 | -public interface PcepRroObject { | 28 | +public interface PcepRroObject { |
29 | - | 29 | + |
30 | - /** | 30 | + /** |
31 | - * Returns list of SubObjects. | 31 | + * Returns list of SubObjects. |
32 | - * | 32 | + * |
33 | - * @return list of SubObjects | 33 | + * @return list of SubObjects |
34 | - */ | 34 | + */ |
35 | - LinkedList<PcepValueType> getSubObjects(); | 35 | + LinkedList<PcepValueType> getSubObjects(); |
36 | - | 36 | + |
37 | - /** | 37 | + /** |
38 | - * Sets list of SubObjects and return its builder. | 38 | + * Sets list of SubObjects and return its builder. |
39 | - * | 39 | + * |
40 | - * @param llSubObjects list of SubObjects | 40 | + * @param llSubObjects list of SubObjects |
41 | - */ | 41 | + */ |
42 | - void setSubObjects(LinkedList<PcepValueType> llSubObjects); | 42 | + void setSubObjects(LinkedList<PcepValueType> llSubObjects); |
43 | - | 43 | + |
44 | - /** | 44 | + /** |
45 | - * Prints attributes of RRO object. | 45 | + * Prints attributes of RRO object. |
46 | - */ | 46 | + */ |
47 | - void print(); | 47 | + void print(); |
48 | - | 48 | + |
49 | - /** | 49 | + /** |
50 | - * Writes the RRO Object into channel buffer. | 50 | + * Writes the RRO Object into channel buffer. |
51 | - * | 51 | + * |
52 | - * @param bb channel buffer | 52 | + * @param bb channel buffer |
53 | - * @return Returns the writerIndex of this buffer | 53 | + * @return Returns the writerIndex of this buffer |
54 | - * @throws PcepParseException when object header failed to write in channel buffer | 54 | + * @throws PcepParseException when object header failed to write in channel buffer |
55 | - */ | 55 | + */ |
56 | - public int write(ChannelBuffer bb) throws PcepParseException; | 56 | + public int write(ChannelBuffer bb) throws PcepParseException; |
57 | - | 57 | + |
58 | - /** | 58 | + /** |
59 | - * Builder interface with get and set functions to build RRO object. | 59 | + * Builder interface with get and set functions to build RRO object. |
60 | - */ | 60 | + */ |
61 | - public interface Builder { | 61 | + public interface Builder { |
62 | - | 62 | + |
63 | - /** | 63 | + /** |
64 | - * Builds RRO Object. | 64 | + * Builds RRO Object. |
65 | - * | 65 | + * |
66 | - * @return RRO Object | 66 | + * @return RRO Object |
67 | - */ | 67 | + */ |
68 | - PcepRroObject build(); | 68 | + PcepRroObject build(); |
69 | - | 69 | + |
70 | - /** | 70 | + /** |
71 | - * Returns RRO object header. | 71 | + * Returns RRO object header. |
72 | - * | 72 | + * |
73 | - * @return RRO object header | 73 | + * @return RRO object header |
74 | - */ | 74 | + */ |
75 | - PcepObjectHeader getRroObjHeader(); | 75 | + PcepObjectHeader getRroObjHeader(); |
76 | - | 76 | + |
77 | - /** | 77 | + /** |
78 | - * Sets RRO object header and returns its builder. | 78 | + * Sets RRO object header and returns its builder. |
79 | - * | 79 | + * |
80 | - * @param obj RRO object header | 80 | + * @param obj RRO object header |
81 | - * @return Builder by setting RRO object header | 81 | + * @return Builder by setting RRO object header |
82 | - */ | 82 | + */ |
83 | - Builder setRroObjHeader(PcepObjectHeader obj); | 83 | + Builder setRroObjHeader(PcepObjectHeader obj); |
84 | - | 84 | + |
85 | - /** | 85 | + /** |
86 | - * Returns list of SubObjects. | 86 | + * Returns list of SubObjects. |
87 | - * | 87 | + * |
88 | - * @return list of SubObjects | 88 | + * @return list of SubObjects |
89 | - */ | 89 | + */ |
90 | - LinkedList<PcepValueType> getSubObjects(); | 90 | + LinkedList<PcepValueType> getSubObjects(); |
91 | - | 91 | + |
92 | - /** | 92 | + /** |
93 | - * Sets list of SubObjects in RRO Object and returns its builder. | 93 | + * Sets list of SubObjects in RRO Object and returns its builder. |
94 | - * | 94 | + * |
95 | - * @param llSubObjects list of SubObjects | 95 | + * @param llSubObjects list of SubObjects |
96 | - * @return Builder by setting list of SubObjects | 96 | + * @return Builder by setting list of SubObjects |
97 | - */ | 97 | + */ |
98 | - Builder setSubObjects(LinkedList<PcepValueType> llSubObjects); | 98 | + Builder setSubObjects(LinkedList<PcepValueType> llSubObjects); |
99 | - | 99 | + |
100 | - /** | 100 | + /** |
101 | - * Sets P flag in RRO object header and returns its builder. | 101 | + * Sets P flag in RRO object header and returns its builder. |
102 | - * | 102 | + * |
103 | - * @param value boolean value to set P flag | 103 | + * @param value boolean value to set P flag |
104 | - * @return Builder by setting P flag | 104 | + * @return Builder by setting P flag |
105 | - */ | 105 | + */ |
106 | - Builder setPFlag(boolean value); | 106 | + Builder setPFlag(boolean value); |
107 | - | 107 | + |
108 | - /** | 108 | + /** |
109 | - * Sets I flag in RRO object header and returns its builder. | 109 | + * Sets I flag in RRO object header and returns its builder. |
110 | - * | 110 | + * |
111 | - * @param value boolean value to set I flag | 111 | + * @param value boolean value to set I flag |
112 | - * @return Builder by setting I flag | 112 | + * @return Builder by setting I flag |
113 | - */ | 113 | + */ |
114 | - Builder setIFlag(boolean value); | 114 | + Builder setIFlag(boolean value); |
115 | - } | 115 | + } |
116 | } | 116 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | - | 16 | + |
17 | -package org.onosproject.pcepio.protocol; | 17 | +package org.onosproject.pcepio.protocol; |
18 | - | 18 | + |
19 | -import org.jboss.netty.buffer.ChannelBuffer; | 19 | +import org.jboss.netty.buffer.ChannelBuffer; |
20 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 20 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
21 | - | 21 | + |
22 | -/** | 22 | +/** |
23 | - * Abstraction of an entity provides State Report for PCEP Report Message. | 23 | + * Abstraction of an entity provides State Report for PCEP Report Message. |
24 | - */ | 24 | + */ |
25 | -public interface PcepStateReport { | 25 | +public interface PcepStateReport { |
26 | - | 26 | + |
27 | - /** | 27 | + /** |
28 | - * Provides PCEP Message path for report message. | 28 | + * Provides PCEP Message path for report message. |
29 | - */ | 29 | + */ |
30 | - public interface PcepMsgPath { | 30 | + public interface PcepMsgPath { |
31 | - | 31 | + |
32 | - /** | 32 | + /** |
33 | - * Returns PcepEroObject. | 33 | + * Returns PcepEroObject. |
34 | - * | 34 | + * |
35 | - * @return eroObj | 35 | + * @return eroObj |
36 | - */ | 36 | + */ |
37 | - PcepEroObject getEroObject(); | 37 | + PcepEroObject getEroObject(); |
38 | - | 38 | + |
39 | - /** | 39 | + /** |
40 | - * Sets PcepEroObject. | 40 | + * Sets PcepEroObject. |
41 | - * | 41 | + * |
42 | - * @param eroObject Ero Object | 42 | + * @param eroObject Ero Object |
43 | - */ | 43 | + */ |
44 | - void setEroObject(PcepEroObject eroObject); | 44 | + void setEroObject(PcepEroObject eroObject); |
45 | - | 45 | + |
46 | - /** | 46 | + /** |
47 | - * Returns PcepAttribute. | 47 | + * Returns PcepAttribute. |
48 | - * | 48 | + * |
49 | - * @return attrList | 49 | + * @return attrList |
50 | - */ | 50 | + */ |
51 | - PcepAttribute getPcepAttribute(); | 51 | + PcepAttribute getPcepAttribute(); |
52 | - | 52 | + |
53 | - /** | 53 | + /** |
54 | - * Sets PcepAttribute. | 54 | + * Sets PcepAttribute. |
55 | - * | 55 | + * |
56 | - * @param pcepAttribute Pcep Attribute object | 56 | + * @param pcepAttribute Pcep Attribute object |
57 | - */ | 57 | + */ |
58 | - void setPcepAttribute(PcepAttribute pcepAttribute); | 58 | + void setPcepAttribute(PcepAttribute pcepAttribute); |
59 | - | 59 | + |
60 | - /** | 60 | + /** |
61 | - * Returns PcepRroObject. | 61 | + * Returns PcepRroObject. |
62 | - * | 62 | + * |
63 | - * @return rroObj | 63 | + * @return rroObj |
64 | - */ | 64 | + */ |
65 | - PcepRroObject getRroObject(); | 65 | + PcepRroObject getRroObject(); |
66 | - | 66 | + |
67 | - /** | 67 | + /** |
68 | - * Sets PcepRroObject. | 68 | + * Sets PcepRroObject. |
69 | - * | 69 | + * |
70 | - * @param rroObject Rro object | 70 | + * @param rroObject Rro object |
71 | - */ | 71 | + */ |
72 | - void setRroObject(PcepRroObject rroObject); | 72 | + void setRroObject(PcepRroObject rroObject); |
73 | - | 73 | + |
74 | - /** | 74 | + /** |
75 | - * Returns PcepBandwidthObject. | 75 | + * Returns PcepBandwidthObject. |
76 | - * | 76 | + * |
77 | - * @return bandwidth object | 77 | + * @return bandwidth object |
78 | - */ | 78 | + */ |
79 | - PcepBandwidthObject getBandwidthObject(); | 79 | + PcepBandwidthObject getBandwidthObject(); |
80 | - | 80 | + |
81 | - /** | 81 | + /** |
82 | - * Sets PcepBandwidthObject. | 82 | + * Sets PcepBandwidthObject. |
83 | - * | 83 | + * |
84 | - * @param bandwidth bandwidth object | 84 | + * @param bandwidth bandwidth object |
85 | - */ | 85 | + */ |
86 | - void setBandwidthObject(PcepBandwidthObject bandwidth); | 86 | + void setBandwidthObject(PcepBandwidthObject bandwidth); |
87 | - | 87 | + |
88 | - /** | 88 | + /** |
89 | - * Reads all the Objects for PCEP Message Path. | 89 | + * Reads all the Objects for PCEP Message Path. |
90 | - * | 90 | + * |
91 | - * @param bb of type channel buffer | 91 | + * @param bb of type channel buffer |
92 | - * @return PCEP Message path | 92 | + * @return PCEP Message path |
93 | - * @throws PcepParseException when invalid buffer received | 93 | + * @throws PcepParseException when invalid buffer received |
94 | - */ | 94 | + */ |
95 | - public PcepMsgPath read(ChannelBuffer bb) throws PcepParseException; | 95 | + public PcepMsgPath read(ChannelBuffer bb) throws PcepParseException; |
96 | - | 96 | + |
97 | - /** | 97 | + /** |
98 | - * Writes all the objects for pcep message path. | 98 | + * Writes all the objects for pcep message path. |
99 | - * | 99 | + * |
100 | - * @param bb of type channel buffer. | 100 | + * @param bb of type channel buffer. |
101 | - * @return object length index | 101 | + * @return object length index |
102 | - * @throws PcepParseException when mandatory object is not set | 102 | + * @throws PcepParseException when mandatory object is not set |
103 | - */ | 103 | + */ |
104 | - public int write(ChannelBuffer bb) throws PcepParseException; | 104 | + public int write(ChannelBuffer bb) throws PcepParseException; |
105 | - | 105 | + |
106 | - /*** | 106 | + /*** |
107 | - * Prints the attribute of PCEP Message Path. | 107 | + * Prints the attribute of PCEP Message Path. |
108 | - */ | 108 | + */ |
109 | - public void print(); | 109 | + public void print(); |
110 | - | 110 | + |
111 | - } | 111 | + } |
112 | - | 112 | + |
113 | - /** | 113 | + /** |
114 | - * Returns PcepSrpObject. | 114 | + * Returns PcepSrpObject. |
115 | - * | 115 | + * |
116 | - * @return srpObject | 116 | + * @return srpObject |
117 | - */ | 117 | + */ |
118 | - PcepSrpObject getSrpObject(); | 118 | + PcepSrpObject getSrpObject(); |
119 | - | 119 | + |
120 | - /** | 120 | + /** |
121 | - * Returns PcepLspObject. | 121 | + * Returns PcepLspObject. |
122 | - * | 122 | + * |
123 | - * @return lspObject | 123 | + * @return lspObject |
124 | - */ | 124 | + */ |
125 | - PcepLspObject getLspObject(); | 125 | + PcepLspObject getLspObject(); |
126 | - | 126 | + |
127 | - /** | 127 | + /** |
128 | - * Returns PcepMsgPath. | 128 | + * Returns PcepMsgPath. |
129 | - * | 129 | + * |
130 | - * @return msgPath | 130 | + * @return msgPath |
131 | - */ | 131 | + */ |
132 | - PcepMsgPath getMsgPath(); | 132 | + PcepMsgPath getMsgPath(); |
133 | - | 133 | + |
134 | - /** | 134 | + /** |
135 | - * Sets the SRP Object. | 135 | + * Sets the SRP Object. |
136 | - * | 136 | + * |
137 | - * @param srpObj Pcep Srp Object | 137 | + * @param srpObj Pcep Srp Object |
138 | - */ | 138 | + */ |
139 | - void setSrpObject(PcepSrpObject srpObj); | 139 | + void setSrpObject(PcepSrpObject srpObj); |
140 | - | 140 | + |
141 | - /** | 141 | + /** |
142 | - * Sets the LSP Object. | 142 | + * Sets the LSP Object. |
143 | - * | 143 | + * |
144 | - * @param lspObject Pcep Lsp Object | 144 | + * @param lspObject Pcep Lsp Object |
145 | - */ | 145 | + */ |
146 | - void setLspObject(PcepLspObject lspObject); | 146 | + void setLspObject(PcepLspObject lspObject); |
147 | - | 147 | + |
148 | - /** | 148 | + /** |
149 | - * Sets the Path Object. | 149 | + * Sets the Path Object. |
150 | - * | 150 | + * |
151 | - * @param msgPath Pcep MsgPath object | 151 | + * @param msgPath Pcep MsgPath object |
152 | - */ | 152 | + */ |
153 | - void setMsgPath(PcepMsgPath msgPath); | 153 | + void setMsgPath(PcepMsgPath msgPath); |
154 | - | 154 | + |
155 | - /** | 155 | + /** |
156 | - * Prints the attribute of PCEP state report. | 156 | + * Prints the attribute of PCEP state report. |
157 | - */ | 157 | + */ |
158 | - public void print(); | 158 | + public void print(); |
159 | - | 159 | + |
160 | - /** | 160 | + /** |
161 | - * Builder interface with get and set functions to build PcepStateReport. | 161 | + * Builder interface with get and set functions to build PcepStateReport. |
162 | - */ | 162 | + */ |
163 | - public interface Builder { | 163 | + public interface Builder { |
164 | - | 164 | + |
165 | - /** | 165 | + /** |
166 | - * Builds PcepStateReport. | 166 | + * Builds PcepStateReport. |
167 | - * | 167 | + * |
168 | - * @return PcepStateReport | 168 | + * @return PcepStateReport |
169 | - * @throws PcepParseException when mandatory object is not set | 169 | + * @throws PcepParseException when mandatory object is not set |
170 | - */ | 170 | + */ |
171 | - PcepStateReport build() throws PcepParseException; | 171 | + PcepStateReport build() throws PcepParseException; |
172 | - | 172 | + |
173 | - /** | 173 | + /** |
174 | - * Returns PcepSrpObject. | 174 | + * Returns PcepSrpObject. |
175 | - * | 175 | + * |
176 | - * @return srpObject | 176 | + * @return srpObject |
177 | - */ | 177 | + */ |
178 | - PcepSrpObject getSrpObject(); | 178 | + PcepSrpObject getSrpObject(); |
179 | - | 179 | + |
180 | - /** | 180 | + /** |
181 | - * Returns PcepLspObject. | 181 | + * Returns PcepLspObject. |
182 | - * | 182 | + * |
183 | - * @return lspObject | 183 | + * @return lspObject |
184 | - */ | 184 | + */ |
185 | - PcepLspObject getLspObject(); | 185 | + PcepLspObject getLspObject(); |
186 | - | 186 | + |
187 | - /** | 187 | + /** |
188 | - * Returns PcepMsgPath. | 188 | + * Returns PcepMsgPath. |
189 | - * | 189 | + * |
190 | - * @return msgPath | 190 | + * @return msgPath |
191 | - */ | 191 | + */ |
192 | - PcepMsgPath getMsgPath(); | 192 | + PcepMsgPath getMsgPath(); |
193 | - | 193 | + |
194 | - /** | 194 | + /** |
195 | - * Sets the SRP Object. | 195 | + * Sets the SRP Object. |
196 | - * | 196 | + * |
197 | - * @param srpObj Pcep Srp Object | 197 | + * @param srpObj Pcep Srp Object |
198 | - * @return builder by setting PcepSrpObject | 198 | + * @return builder by setting PcepSrpObject |
199 | - */ | 199 | + */ |
200 | - Builder setSrpObject(PcepSrpObject srpObj); | 200 | + Builder setSrpObject(PcepSrpObject srpObj); |
201 | - | 201 | + |
202 | - /** | 202 | + /** |
203 | - * Sets the LSP Object. | 203 | + * Sets the LSP Object. |
204 | - * | 204 | + * |
205 | - * @param lspObject Pcep Lsp Object | 205 | + * @param lspObject Pcep Lsp Object |
206 | - * @return builder by setting PcepLspObject | 206 | + * @return builder by setting PcepLspObject |
207 | - */ | 207 | + */ |
208 | - Builder setLspObject(PcepLspObject lspObject); | 208 | + Builder setLspObject(PcepLspObject lspObject); |
209 | - | 209 | + |
210 | - /** | 210 | + /** |
211 | - * Sets the Path Object. | 211 | + * Sets the Path Object. |
212 | - * | 212 | + * |
213 | - * @param msgPath Pcep MsgPath object | 213 | + * @param msgPath Pcep MsgPath object |
214 | - * @return builder by setting PcepMsgPath | 214 | + * @return builder by setting PcepMsgPath |
215 | - */ | 215 | + */ |
216 | - Builder setMsgPath(PcepMsgPath msgPath); | 216 | + Builder setMsgPath(PcepMsgPath msgPath); |
217 | - } | 217 | + } |
218 | -} | 218 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | -package org.onosproject.pcepio.protocol; | 16 | +package org.onosproject.pcepio.protocol; |
17 | - | 17 | + |
18 | -import java.util.LinkedList; | 18 | +import java.util.LinkedList; |
19 | - | 19 | + |
20 | -import org.jboss.netty.buffer.ChannelBuffer; | 20 | +import org.jboss.netty.buffer.ChannelBuffer; |
21 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 21 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
22 | -import org.onosproject.pcepio.types.PcepObjectHeader; | 22 | +import org.onosproject.pcepio.types.PcepObjectHeader; |
23 | -import org.onosproject.pcepio.types.PcepValueType; | 23 | +import org.onosproject.pcepio.types.PcepValueType; |
24 | - | 24 | + |
25 | -/** | 25 | +/** |
26 | - * Abstraction of an entity providing PCEP TE Object. | 26 | + * Abstraction of an entity providing PCEP TE Object. |
27 | - */ | 27 | + */ |
28 | -public interface PcepTEObject { | 28 | +public interface PcepTEObject { |
29 | - | 29 | + |
30 | - /** | 30 | + /** |
31 | - * Returns TE object header. | 31 | + * Returns TE object header. |
32 | - * | 32 | + * |
33 | - * @return TE object header | 33 | + * @return TE object header |
34 | - */ | 34 | + */ |
35 | - PcepObjectHeader getTEObjHeader(); | 35 | + PcepObjectHeader getTEObjHeader(); |
36 | - | 36 | + |
37 | - /** | 37 | + /** |
38 | - * Sets TE Object header. | 38 | + * Sets TE Object header. |
39 | - * | 39 | + * |
40 | - * @param obj TE Object header | 40 | + * @param obj TE Object header |
41 | - */ | 41 | + */ |
42 | - void setTEObjHeader(PcepObjectHeader obj); | 42 | + void setTEObjHeader(PcepObjectHeader obj); |
43 | - | 43 | + |
44 | - /** | 44 | + /** |
45 | - * Returns ProtocolId in TE Object. | 45 | + * Returns ProtocolId in TE Object. |
46 | - * | 46 | + * |
47 | - * @return ProtocolId in TE Object | 47 | + * @return ProtocolId in TE Object |
48 | - */ | 48 | + */ |
49 | - byte getProtocolId(); | 49 | + byte getProtocolId(); |
50 | - | 50 | + |
51 | - /** | 51 | + /** |
52 | - * Sets ProtocolId in TE Object. | 52 | + * Sets ProtocolId in TE Object. |
53 | - * | 53 | + * |
54 | - * @param yProtId ProtocolId in TE Object | 54 | + * @param yProtId ProtocolId in TE Object |
55 | - */ | 55 | + */ |
56 | - void setProtocolId(byte yProtId); | 56 | + void setProtocolId(byte yProtId); |
57 | - | 57 | + |
58 | - /** | 58 | + /** |
59 | - * Returns R flag in TE Object. | 59 | + * Returns R flag in TE Object. |
60 | - * | 60 | + * |
61 | - * @return R flag in TE Object | 61 | + * @return R flag in TE Object |
62 | - */ | 62 | + */ |
63 | - boolean getRFlag(); | 63 | + boolean getRFlag(); |
64 | - | 64 | + |
65 | - /** | 65 | + /** |
66 | - * Sets R flag in TE Object. | 66 | + * Sets R flag in TE Object. |
67 | - * | 67 | + * |
68 | - * @param bRFlag R flag in TE Object | 68 | + * @param bRFlag R flag in TE Object |
69 | - */ | 69 | + */ |
70 | - void setRFlag(boolean bRFlag); | 70 | + void setRFlag(boolean bRFlag); |
71 | - | 71 | + |
72 | - /** | 72 | + /** |
73 | - * Returns S flag in TE Object. | 73 | + * Returns S flag in TE Object. |
74 | - * | 74 | + * |
75 | - * @return S flag in TE Object | 75 | + * @return S flag in TE Object |
76 | - */ | 76 | + */ |
77 | - boolean getSFlag(); | 77 | + boolean getSFlag(); |
78 | - | 78 | + |
79 | - /** | 79 | + /** |
80 | - * Sets S flag in TE Object. | 80 | + * Sets S flag in TE Object. |
81 | - * | 81 | + * |
82 | - * @param bSFlag S flag in TE Object | 82 | + * @param bSFlag S flag in TE Object |
83 | - */ | 83 | + */ |
84 | - void setSFlag(boolean bSFlag); | 84 | + void setSFlag(boolean bSFlag); |
85 | - | 85 | + |
86 | - /** | 86 | + /** |
87 | - * Returns TE ID in TE Object. | 87 | + * Returns TE ID in TE Object. |
88 | - * | 88 | + * |
89 | - * @return TE ID in TE Object | 89 | + * @return TE ID in TE Object |
90 | - */ | 90 | + */ |
91 | - int getTEId(); | 91 | + int getTEId(); |
92 | - | 92 | + |
93 | - /** | 93 | + /** |
94 | - * Sets TE ID in TE Object. | 94 | + * Sets TE ID in TE Object. |
95 | - * | 95 | + * |
96 | - * @param iTEId TE ID in TE Object | 96 | + * @param iTEId TE ID in TE Object |
97 | - */ | 97 | + */ |
98 | - void setTEId(int iTEId); | 98 | + void setTEId(int iTEId); |
99 | - | 99 | + |
100 | - /** | 100 | + /** |
101 | - * Returns list of Optional Tlvs in TE Object. | 101 | + * Returns list of Optional Tlvs in TE Object. |
102 | - * | 102 | + * |
103 | - * @return list of Optional Tlvs | 103 | + * @return list of Optional Tlvs |
104 | - */ | 104 | + */ |
105 | - LinkedList<PcepValueType> getOptionalTlv(); | 105 | + LinkedList<PcepValueType> getOptionalTlv(); |
106 | - | 106 | + |
107 | - /** | 107 | + /** |
108 | - * Sets list of Optional Tlvs in TE Object. | 108 | + * Sets list of Optional Tlvs in TE Object. |
109 | - * | 109 | + * |
110 | - * @param llOptionalTlv list of Optional Tlvs | 110 | + * @param llOptionalTlv list of Optional Tlvs |
111 | - */ | 111 | + */ |
112 | - void setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); | 112 | + void setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); |
113 | - | 113 | + |
114 | - /** | 114 | + /** |
115 | - * Prints attributes of TE object. | 115 | + * Prints attributes of TE object. |
116 | - */ | 116 | + */ |
117 | - void print(); | 117 | + void print(); |
118 | - | 118 | + |
119 | - /** | 119 | + /** |
120 | - * Writes the TE Object into channel buffer. | 120 | + * Writes the TE Object into channel buffer. |
121 | - * | 121 | + * |
122 | - * @param bb channel buffer | 122 | + * @param bb channel buffer |
123 | - * @return Returns the writerIndex of this buffer | 123 | + * @return Returns the writerIndex of this buffer |
124 | - * @throws PcepParseException when obj header is not written to channel buffer | 124 | + * @throws PcepParseException when obj header is not written to channel buffer |
125 | - */ | 125 | + */ |
126 | - public int write(ChannelBuffer bb) throws PcepParseException; | 126 | + public int write(ChannelBuffer bb) throws PcepParseException; |
127 | - | 127 | + |
128 | - /** | 128 | + /** |
129 | - * Builder interface with get and set functions to build TE object. | 129 | + * Builder interface with get and set functions to build TE object. |
130 | - */ | 130 | + */ |
131 | - public interface Builder { | 131 | + public interface Builder { |
132 | - | 132 | + |
133 | - /** | 133 | + /** |
134 | - * Builds TE Object. | 134 | + * Builds TE Object. |
135 | - * | 135 | + * |
136 | - * @return TE Object | 136 | + * @return TE Object |
137 | - */ | 137 | + */ |
138 | - PcepTEObject build(); | 138 | + PcepTEObject build(); |
139 | - | 139 | + |
140 | - /** | 140 | + /** |
141 | - * Returns TE object header. | 141 | + * Returns TE object header. |
142 | - * | 142 | + * |
143 | - * @return TE object header | 143 | + * @return TE object header |
144 | - */ | 144 | + */ |
145 | - PcepObjectHeader getTEObjHeader(); | 145 | + PcepObjectHeader getTEObjHeader(); |
146 | - | 146 | + |
147 | - /** | 147 | + /** |
148 | - * Sets TE object header and returns its builder. | 148 | + * Sets TE object header and returns its builder. |
149 | - * | 149 | + * |
150 | - * @param obj TE object header | 150 | + * @param obj TE object header |
151 | - * @return Builder by setting TE object header | 151 | + * @return Builder by setting TE object header |
152 | - */ | 152 | + */ |
153 | - Builder setTEObjHeader(PcepObjectHeader obj); | 153 | + Builder setTEObjHeader(PcepObjectHeader obj); |
154 | - | 154 | + |
155 | - /** | 155 | + /** |
156 | - * Returns ProtocolId in TE Object. | 156 | + * Returns ProtocolId in TE Object. |
157 | - * | 157 | + * |
158 | - * @return ProtocolId in TE Object | 158 | + * @return ProtocolId in TE Object |
159 | - */ | 159 | + */ |
160 | - byte getProtocolId(); | 160 | + byte getProtocolId(); |
161 | - | 161 | + |
162 | - /** | 162 | + /** |
163 | - * Sets ProtocolId in TE Object and returns its builder. | 163 | + * Sets ProtocolId in TE Object and returns its builder. |
164 | - * | 164 | + * |
165 | - * @param yProtId ProtocolId in TE Object | 165 | + * @param yProtId ProtocolId in TE Object |
166 | - * @return Builder by setting ProtocolId | 166 | + * @return Builder by setting ProtocolId |
167 | - */ | 167 | + */ |
168 | - Builder setProtocolId(byte yProtId); | 168 | + Builder setProtocolId(byte yProtId); |
169 | - | 169 | + |
170 | - /** | 170 | + /** |
171 | - * Returns R flag in TE Object. | 171 | + * Returns R flag in TE Object. |
172 | - * | 172 | + * |
173 | - * @return R flag in TE Object | 173 | + * @return R flag in TE Object |
174 | - */ | 174 | + */ |
175 | - boolean getRFlag(); | 175 | + boolean getRFlag(); |
176 | - | 176 | + |
177 | - /** | 177 | + /** |
178 | - * Sets R flag in TE Object and returns its builder. | 178 | + * Sets R flag in TE Object and returns its builder. |
179 | - * | 179 | + * |
180 | - * @param bRFlag R flag in TE Object | 180 | + * @param bRFlag R flag in TE Object |
181 | - * @return Builder by setting R flag | 181 | + * @return Builder by setting R flag |
182 | - */ | 182 | + */ |
183 | - Builder setRFlag(boolean bRFlag); | 183 | + Builder setRFlag(boolean bRFlag); |
184 | - | 184 | + |
185 | - /** | 185 | + /** |
186 | - * Returns S flag in TE Object. | 186 | + * Returns S flag in TE Object. |
187 | - * | 187 | + * |
188 | - * @return S flag in TE Object | 188 | + * @return S flag in TE Object |
189 | - */ | 189 | + */ |
190 | - boolean getSFlag(); | 190 | + boolean getSFlag(); |
191 | - | 191 | + |
192 | - /** | 192 | + /** |
193 | - * Sets S flag in TE Object and returns its builder. | 193 | + * Sets S flag in TE Object and returns its builder. |
194 | - * | 194 | + * |
195 | - * @param bSFlag S flag in TE Object | 195 | + * @param bSFlag S flag in TE Object |
196 | - * @return Builder by setting S flag | 196 | + * @return Builder by setting S flag |
197 | - */ | 197 | + */ |
198 | - Builder setSFlag(boolean bSFlag); | 198 | + Builder setSFlag(boolean bSFlag); |
199 | - | 199 | + |
200 | - /** | 200 | + /** |
201 | - * Returns TE ID in TE Object. | 201 | + * Returns TE ID in TE Object. |
202 | - * | 202 | + * |
203 | - * @return TE ID in TE Object | 203 | + * @return TE ID in TE Object |
204 | - */ | 204 | + */ |
205 | - int getTEId(); | 205 | + int getTEId(); |
206 | - | 206 | + |
207 | - /** | 207 | + /** |
208 | - * Sets TE ID in TE Object and returns its builder. | 208 | + * Sets TE ID in TE Object and returns its builder. |
209 | - * | 209 | + * |
210 | - * @param iTEId TE ID in TE Object | 210 | + * @param iTEId TE ID in TE Object |
211 | - * @return Builder by setting TE ID | 211 | + * @return Builder by setting TE ID |
212 | - */ | 212 | + */ |
213 | - Builder setTEId(int iTEId); | 213 | + Builder setTEId(int iTEId); |
214 | - | 214 | + |
215 | - /** | 215 | + /** |
216 | - * Returns list of Optional Tlvs in TE Object. | 216 | + * Returns list of Optional Tlvs in TE Object. |
217 | - * | 217 | + * |
218 | - * @return list of Optional Tlvs | 218 | + * @return list of Optional Tlvs |
219 | - */ | 219 | + */ |
220 | - LinkedList<PcepValueType> getOptionalTlv(); | 220 | + LinkedList<PcepValueType> getOptionalTlv(); |
221 | - | 221 | + |
222 | - /** | 222 | + /** |
223 | - * Sets list of Optional Tlvs in TE Object and returns its builder. | 223 | + * Sets list of Optional Tlvs in TE Object and returns its builder. |
224 | - * | 224 | + * |
225 | - * @param llOptionalTlv list of Optional Tlvs | 225 | + * @param llOptionalTlv list of Optional Tlvs |
226 | - * @return Builder by setting list of Optional Tlvs | 226 | + * @return Builder by setting list of Optional Tlvs |
227 | - */ | 227 | + */ |
228 | - Builder setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); | 228 | + Builder setOptionalTlv(LinkedList<PcepValueType> llOptionalTlv); |
229 | - | 229 | + |
230 | - /** | 230 | + /** |
231 | - * Sets P flag in TE object header and returns its builder. | 231 | + * Sets P flag in TE object header and returns its builder. |
232 | - * | 232 | + * |
233 | - * @param value boolean value to set P flag | 233 | + * @param value boolean value to set P flag |
234 | - * @return Builder by setting P flag | 234 | + * @return Builder by setting P flag |
235 | - */ | 235 | + */ |
236 | - Builder setPFlag(boolean value); | 236 | + Builder setPFlag(boolean value); |
237 | - | 237 | + |
238 | - /** | 238 | + /** |
239 | - * Sets I flag in TE object header and returns its builder. | 239 | + * Sets I flag in TE object header and returns its builder. |
240 | - * | 240 | + * |
241 | - * @param value boolean value to set I flag | 241 | + * @param value boolean value to set I flag |
242 | - * @return Builder by setting I flag | 242 | + * @return Builder by setting I flag |
243 | - */ | 243 | + */ |
244 | - Builder setIFlag(boolean value); | 244 | + Builder setIFlag(boolean value); |
245 | - } | 245 | + } |
246 | } | 246 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | - | 16 | + |
17 | -package org.onosproject.pcepio.protocol; | 17 | +package org.onosproject.pcepio.protocol; |
18 | - | 18 | + |
19 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 19 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
20 | - | 20 | + |
21 | - | 21 | + |
22 | -/** | 22 | +/** |
23 | - * Abstraction of an entity providing PCEP Update Request List. | 23 | + * Abstraction of an entity providing PCEP Update Request List. |
24 | - */ | 24 | + */ |
25 | -public interface PcepUpdateRequest { | 25 | +public interface PcepUpdateRequest { |
26 | - | 26 | + |
27 | - /** | 27 | + /** |
28 | - * Returns object of PCEP SRP Object. | 28 | + * Returns object of PCEP SRP Object. |
29 | - * | 29 | + * |
30 | - * @return srpObject of type PCEP SRP Object | 30 | + * @return srpObject of type PCEP SRP Object |
31 | - */ | 31 | + */ |
32 | - PcepSrpObject getSrpObject(); | 32 | + PcepSrpObject getSrpObject(); |
33 | - | 33 | + |
34 | - /** | 34 | + /** |
35 | - * Returns object of PCEP LSP Object. | 35 | + * Returns object of PCEP LSP Object. |
36 | - * | 36 | + * |
37 | - * @return lspObject of type PCEP LSP Object | 37 | + * @return lspObject of type PCEP LSP Object |
38 | - */ | 38 | + */ |
39 | - PcepLspObject getLspObject(); | 39 | + PcepLspObject getLspObject(); |
40 | - | 40 | + |
41 | - /** | 41 | + /** |
42 | - * Returns object of PCEP MSG PATH. | 42 | + * Returns object of PCEP MSG PATH. |
43 | - * | 43 | + * |
44 | - * @return msgPath of type PCEP MSG PATH | 44 | + * @return msgPath of type PCEP MSG PATH |
45 | - */ | 45 | + */ |
46 | - PcepMsgPath getMsgPath(); | 46 | + PcepMsgPath getMsgPath(); |
47 | - | 47 | + |
48 | - /** | 48 | + /** |
49 | - * Sets the PCEP SRP Object. | 49 | + * Sets the PCEP SRP Object. |
50 | - * | 50 | + * |
51 | - * @param srpObject object of type PCEP SRP Object | 51 | + * @param srpObject object of type PCEP SRP Object |
52 | - */ | 52 | + */ |
53 | - void setSrpObject(PcepSrpObject srpObject); | 53 | + void setSrpObject(PcepSrpObject srpObject); |
54 | - | 54 | + |
55 | - /** | 55 | + /** |
56 | - * Sets the PCEP LSP Object. | 56 | + * Sets the PCEP LSP Object. |
57 | - * | 57 | + * |
58 | - * @param lspObject object of type PCEP LSP Object | 58 | + * @param lspObject object of type PCEP LSP Object |
59 | - */ | 59 | + */ |
60 | - void setLspObject(PcepLspObject lspObject); | 60 | + void setLspObject(PcepLspObject lspObject); |
61 | - | 61 | + |
62 | - /** | 62 | + /** |
63 | - * sets the PCEP MSG PATH. | 63 | + * sets the PCEP MSG PATH. |
64 | - * | 64 | + * |
65 | - * @param msgPath object of type PCEP MSG PATH | 65 | + * @param msgPath object of type PCEP MSG PATH |
66 | - */ | 66 | + */ |
67 | - void setMsgPath(PcepMsgPath msgPath); | 67 | + void setMsgPath(PcepMsgPath msgPath); |
68 | - | 68 | + |
69 | - /** | 69 | + /** |
70 | - * Prints the attributes of PCEP Update Request. | 70 | + * Prints the attributes of PCEP Update Request. |
71 | - */ | 71 | + */ |
72 | - public void print(); | 72 | + public void print(); |
73 | - | 73 | + |
74 | - /** | 74 | + /** |
75 | - * Builder interface with get and set functions to build PcepUpdateRequest. | 75 | + * Builder interface with get and set functions to build PcepUpdateRequest. |
76 | - */ | 76 | + */ |
77 | - public interface Builder { | 77 | + public interface Builder { |
78 | - | 78 | + |
79 | - /** | 79 | + /** |
80 | - * Builds PcepUpdateRequest. | 80 | + * Builds PcepUpdateRequest. |
81 | - * | 81 | + * |
82 | - * @return PcepUpdateRequest | 82 | + * @return PcepUpdateRequest |
83 | - * @throws PcepParseException if mandatory object is not set | 83 | + * @throws PcepParseException if mandatory object is not set |
84 | - */ | 84 | + */ |
85 | - PcepUpdateRequest build() throws PcepParseException; | 85 | + PcepUpdateRequest build() throws PcepParseException; |
86 | - | 86 | + |
87 | - /** | 87 | + /** |
88 | - * Returns PcepSrpObject. | 88 | + * Returns PcepSrpObject. |
89 | - * | 89 | + * |
90 | - * @return srpObject | 90 | + * @return srpObject |
91 | - */ | 91 | + */ |
92 | - PcepSrpObject getSrpObject(); | 92 | + PcepSrpObject getSrpObject(); |
93 | - | 93 | + |
94 | - /** | 94 | + /** |
95 | - * Returns PcepLspObject. | 95 | + * Returns PcepLspObject. |
96 | - * | 96 | + * |
97 | - * @return lspObject | 97 | + * @return lspObject |
98 | - */ | 98 | + */ |
99 | - PcepLspObject getLspObject(); | 99 | + PcepLspObject getLspObject(); |
100 | - | 100 | + |
101 | - /** | 101 | + /** |
102 | - * Returns PcepMsgPath. | 102 | + * Returns PcepMsgPath. |
103 | - * | 103 | + * |
104 | - * @return msgPath | 104 | + * @return msgPath |
105 | - */ | 105 | + */ |
106 | - PcepMsgPath getMsgPath(); | 106 | + PcepMsgPath getMsgPath(); |
107 | - | 107 | + |
108 | - /** | 108 | + /** |
109 | - * Sets the SRP Object. | 109 | + * Sets the SRP Object. |
110 | - * | 110 | + * |
111 | - * @param srpObj of type PcepSrpObject | 111 | + * @param srpObj of type PcepSrpObject |
112 | - * @return builder by setting PcepSrpObject | 112 | + * @return builder by setting PcepSrpObject |
113 | - */ | 113 | + */ |
114 | - Builder setSrpObject(PcepSrpObject srpObj); | 114 | + Builder setSrpObject(PcepSrpObject srpObj); |
115 | - | 115 | + |
116 | - /** | 116 | + /** |
117 | - * Sets the LSP Object. | 117 | + * Sets the LSP Object. |
118 | - * | 118 | + * |
119 | - * @param lspObject of type PcepLspObject | 119 | + * @param lspObject of type PcepLspObject |
120 | - * @return builder by setting PcepLspObject | 120 | + * @return builder by setting PcepLspObject |
121 | - */ | 121 | + */ |
122 | - Builder setLspObject(PcepLspObject lspObject); | 122 | + Builder setLspObject(PcepLspObject lspObject); |
123 | - | 123 | + |
124 | - /** | 124 | + /** |
125 | - * Sets the Path Object. | 125 | + * Sets the Path Object. |
126 | - * | 126 | + * |
127 | - * @param msgPath of type PcepMsgPath | 127 | + * @param msgPath of type PcepMsgPath |
128 | - * @return builder by setting PcepMsgPath | 128 | + * @return builder by setting PcepMsgPath |
129 | - */ | 129 | + */ |
130 | - Builder setMsgPath(PcepMsgPath msgPath); | 130 | + Builder setMsgPath(PcepMsgPath msgPath); |
131 | - } | 131 | + } |
132 | } | 132 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | -package org.onosproject.pcepio.types; | 1 | +package org.onosproject.pcepio.types; |
2 | - | 2 | + |
3 | -import java.util.LinkedList; | 3 | +import java.util.LinkedList; |
4 | -import java.util.ListIterator; | 4 | +import java.util.ListIterator; |
5 | - | 5 | + |
6 | -import org.jboss.netty.buffer.ChannelBuffer; | 6 | +import org.jboss.netty.buffer.ChannelBuffer; |
7 | -import org.onosproject.pcepio.exceptions.PcepParseException; | 7 | +import org.onosproject.pcepio.exceptions.PcepParseException; |
8 | -import org.onosproject.pcepio.protocol.PcepErrorObject; | 8 | +import org.onosproject.pcepio.protocol.PcepErrorObject; |
9 | -import org.onosproject.pcepio.protocol.PcepOpenObject; | 9 | +import org.onosproject.pcepio.protocol.PcepOpenObject; |
10 | -import org.slf4j.Logger; | 10 | +import org.slf4j.Logger; |
11 | -import org.slf4j.LoggerFactory; | 11 | +import org.slf4j.LoggerFactory; |
12 | - | 12 | + |
13 | -/* | 13 | +/* |
14 | - * Provide the error object list with open object. | 14 | + * Provide the error object list with open object. |
15 | - */ | 15 | + */ |
16 | -public class ErrorObjListWithOpen { | 16 | +public class ErrorObjListWithOpen { |
17 | - //errorObjList is mandatory | 17 | + //errorObjList is mandatory |
18 | - LinkedList<PcepErrorObject> llerrorObjList; | 18 | + LinkedList<PcepErrorObject> llerrorObjList; |
19 | - // openObject is optional | 19 | + // openObject is optional |
20 | - PcepOpenObject openObject; | 20 | + PcepOpenObject openObject; |
21 | - // flag to check if open object is set or not | 21 | + // flag to check if open object is set or not |
22 | - public boolean isOpenObjectSet; | 22 | + public boolean isOpenObjectSet; |
23 | - protected static final Logger log = LoggerFactory.getLogger(ErrorObjListWithOpen.class); | 23 | + protected static final Logger log = LoggerFactory.getLogger(ErrorObjListWithOpen.class); |
24 | - | 24 | + |
25 | - /* | 25 | + /* |
26 | - * constructor to initialize errObj,openObj. | 26 | + * constructor to initialize errObj,openObj. |
27 | - * | 27 | + * |
28 | - * @param errObj error object list | 28 | + * @param errObj error object list |
29 | - * @param openObj open object | 29 | + * @param openObj open object |
30 | - */ | 30 | + */ |
31 | - public ErrorObjListWithOpen(LinkedList<PcepErrorObject> errObj, PcepOpenObject openObj) { | 31 | + public ErrorObjListWithOpen(LinkedList<PcepErrorObject> errObj, PcepOpenObject openObj) { |
32 | - this.llerrorObjList = errObj; | 32 | + this.llerrorObjList = errObj; |
33 | - this.openObject = openObj; | 33 | + this.openObject = openObj; |
34 | - if (openObj != null) { | 34 | + if (openObj != null) { |
35 | - isOpenObjectSet = true; | 35 | + isOpenObjectSet = true; |
36 | - } else { | 36 | + } else { |
37 | - isOpenObjectSet = false; | 37 | + isOpenObjectSet = false; |
38 | - } | 38 | + } |
39 | - } | 39 | + } |
40 | - | 40 | + |
41 | - /* | 41 | + /* |
42 | - * constructor to initialize errObj. | 42 | + * constructor to initialize errObj. |
43 | - * | 43 | + * |
44 | - * @param errObj error object list | 44 | + * @param errObj error object list |
45 | - */ | 45 | + */ |
46 | - public ErrorObjListWithOpen(LinkedList<PcepErrorObject> errObj) { | 46 | + public ErrorObjListWithOpen(LinkedList<PcepErrorObject> errObj) { |
47 | - this.llerrorObjList = errObj; | 47 | + this.llerrorObjList = errObj; |
48 | - this.openObject = null; | 48 | + this.openObject = null; |
49 | - isOpenObjectSet = false; | 49 | + isOpenObjectSet = false; |
50 | - } | 50 | + } |
51 | - | 51 | + |
52 | - public LinkedList<Integer> getErrorType() { | 52 | + public LinkedList<Integer> getErrorType() { |
53 | - LinkedList<Integer> errorType = new LinkedList<Integer>(); | 53 | + LinkedList<Integer> errorType = new LinkedList<Integer>(); |
54 | - if (llerrorObjList != null) { | 54 | + if (llerrorObjList != null) { |
55 | - ListIterator<PcepErrorObject> errObjListIterator = llerrorObjList.listIterator(); | 55 | + ListIterator<PcepErrorObject> errObjListIterator = llerrorObjList.listIterator(); |
56 | - int error; | 56 | + int error; |
57 | - PcepErrorObject errorObj; | 57 | + PcepErrorObject errorObj; |
58 | - while (errObjListIterator.hasNext()) { | 58 | + while (errObjListIterator.hasNext()) { |
59 | - errorObj = errObjListIterator.next(); | 59 | + errorObj = errObjListIterator.next(); |
60 | - error = errorObj.getErrorType(); | 60 | + error = errorObj.getErrorType(); |
61 | - errorType.add(error); | 61 | + errorType.add(error); |
62 | - } | 62 | + } |
63 | - } | 63 | + } |
64 | - return errorType; | 64 | + return errorType; |
65 | - } | 65 | + } |
66 | - | 66 | + |
67 | - public LinkedList<Integer> getErrorValue() { | 67 | + public LinkedList<Integer> getErrorValue() { |
68 | - LinkedList<Integer> errorValue = new LinkedList<Integer>(); | 68 | + LinkedList<Integer> errorValue = new LinkedList<Integer>(); |
69 | - if (llerrorObjList != null) { | 69 | + if (llerrorObjList != null) { |
70 | - ListIterator<PcepErrorObject> errObjListIterator = llerrorObjList.listIterator(); | 70 | + ListIterator<PcepErrorObject> errObjListIterator = llerrorObjList.listIterator(); |
71 | - int error; | 71 | + int error; |
72 | - PcepErrorObject errorObj; | 72 | + PcepErrorObject errorObj; |
73 | - while (errObjListIterator.hasNext()) { | 73 | + while (errObjListIterator.hasNext()) { |
74 | - errorObj = errObjListIterator.next(); | 74 | + errorObj = errObjListIterator.next(); |
75 | - error = errorObj.getErrorValue(); | 75 | + error = errorObj.getErrorValue(); |
76 | - errorValue.add(error); | 76 | + errorValue.add(error); |
77 | - | 77 | + |
78 | - } | 78 | + } |
79 | - } | 79 | + } |
80 | - return errorValue; | 80 | + return errorValue; |
81 | - } | 81 | + } |
82 | - /* | 82 | + /* |
83 | - * Checks whether error object list is empty or not. | 83 | + * Checks whether error object list is empty or not. |
84 | - * | 84 | + * |
85 | - * @return whether error object list is empty or not | 85 | + * @return whether error object list is empty or not |
86 | - */ | 86 | + */ |
87 | - public boolean isErrorObjListWithOpenPresent() { | 87 | + public boolean isErrorObjListWithOpenPresent() { |
88 | - // ( <error-obj-list> [<Open>] | 88 | + // ( <error-obj-list> [<Open>] |
89 | - // At least in this case <error-obj-list> should be present. | 89 | + // At least in this case <error-obj-list> should be present. |
90 | - return (!this.llerrorObjList.isEmpty()) ? true : false; | 90 | + return (!this.llerrorObjList.isEmpty()) ? true : false; |
91 | - } | 91 | + } |
92 | - | 92 | + |
93 | - /* | 93 | + /* |
94 | - * Write Error Object List and Open Object to channel buffer. | 94 | + * Write Error Object List and Open Object to channel buffer. |
95 | - * | 95 | + * |
96 | - * @param bb of type channel buffer | 96 | + * @param bb of type channel buffer |
97 | - * @throws PcepParseException when mandatory fields are not set | 97 | + * @throws PcepParseException when mandatory fields are not set |
98 | - */ | 98 | + */ |
99 | - public int write(ChannelBuffer bb) throws PcepParseException { | 99 | + public int write(ChannelBuffer bb) throws PcepParseException { |
100 | - int iLenStartIndex = bb.writerIndex(); | 100 | + int iLenStartIndex = bb.writerIndex(); |
101 | - boolean bIsErrObjListFound = false; | 101 | + boolean bIsErrObjListFound = false; |
102 | - | 102 | + |
103 | - //<error-obj-list> is mandatory , if not present throw exception. | 103 | + //<error-obj-list> is mandatory , if not present throw exception. |
104 | - if (llerrorObjList != null) { | 104 | + if (llerrorObjList != null) { |
105 | - ListIterator<PcepErrorObject> errObjListIterator = llerrorObjList.listIterator(); | 105 | + ListIterator<PcepErrorObject> errObjListIterator = llerrorObjList.listIterator(); |
106 | - while (errObjListIterator.hasNext()) { | 106 | + while (errObjListIterator.hasNext()) { |
107 | - errObjListIterator.next().write(bb); | 107 | + errObjListIterator.next().write(bb); |
108 | - bIsErrObjListFound = true; | 108 | + bIsErrObjListFound = true; |
109 | - } | 109 | + } |
110 | - } | 110 | + } |
111 | - | 111 | + |
112 | - if (!bIsErrObjListFound) { | 112 | + if (!bIsErrObjListFound) { |
113 | - throw new PcepParseException("Error: [ErrorObjListWithOpen::write] <error-obj-list> is mandatory."); | 113 | + throw new PcepParseException("Error: [ErrorObjListWithOpen::write] <error-obj-list> is mandatory."); |
114 | - } | 114 | + } |
115 | - | 115 | + |
116 | - //Open Object is optional , if present write. | 116 | + //Open Object is optional , if present write. |
117 | - if (openObject != null) { | 117 | + if (openObject != null) { |
118 | - openObject.write(bb); | 118 | + openObject.write(bb); |
119 | - } | 119 | + } |
120 | - | 120 | + |
121 | - return bb.writerIndex() - iLenStartIndex; | 121 | + return bb.writerIndex() - iLenStartIndex; |
122 | - } | 122 | + } |
123 | - | 123 | + |
124 | - /* | 124 | + /* |
125 | - * Prints the attributes of ErrorObject List with open Object. | 125 | + * Prints the attributes of ErrorObject List with open Object. |
126 | - */ | 126 | + */ |
127 | - public void print() { | 127 | + public void print() { |
128 | - log.debug("ErrorObjListWithOpen:"); | 128 | + log.debug("ErrorObjListWithOpen:"); |
129 | - ListIterator<PcepErrorObject> pcepErrorObjIterator = llerrorObjList.listIterator(); | 129 | + ListIterator<PcepErrorObject> pcepErrorObjIterator = llerrorObjList.listIterator(); |
130 | - log.debug("<error-obj-list> :"); | 130 | + log.debug("<error-obj-list> :"); |
131 | - while (pcepErrorObjIterator.hasNext()) { | 131 | + while (pcepErrorObjIterator.hasNext()) { |
132 | - pcepErrorObjIterator.next().print(); | 132 | + pcepErrorObjIterator.next().print(); |
133 | - } | 133 | + } |
134 | - | 134 | + |
135 | - log.debug("OpenObject:"); | 135 | + log.debug("OpenObject:"); |
136 | - if (openObject != null) { | 136 | + if (openObject != null) { |
137 | - openObject.print(); | 137 | + openObject.print(); |
138 | - } | 138 | + } |
139 | - } | 139 | + } |
140 | -} | 140 | +} | ... | ... |
1 | -package org.onosproject.pcepio.types; | 1 | +package org.onosproject.pcepio.types; |
2 | - | 2 | + |
3 | -import java.util.LinkedList; | 3 | +import java.util.LinkedList; |
4 | -import java.util.ListIterator; | 4 | +import java.util.ListIterator; |
5 | - | 5 | + |
6 | -import org.onosproject.pcepio.protocol.PcepLabelObject; | 6 | +import org.onosproject.pcepio.protocol.PcepLabelObject; |
7 | -import org.onosproject.pcepio.protocol.PcepLspObject; | 7 | +import org.onosproject.pcepio.protocol.PcepLspObject; |
8 | -import org.onosproject.pcepio.protocol.PcepSrpObject; | 8 | +import org.onosproject.pcepio.protocol.PcepSrpObject; |
9 | -import org.slf4j.Logger; | 9 | +import org.slf4j.Logger; |
10 | -import org.slf4j.LoggerFactory; | 10 | +import org.slf4j.LoggerFactory; |
11 | - | 11 | + |
12 | -/* | 12 | +/* |
13 | - * Provides Pcep Label. | 13 | + * Provides Pcep Label. |
14 | - * REference :draft-zhao-pce-pcep-extension-for-pce-controller-01. | 14 | + * REference :draft-zhao-pce-pcep-extension-for-pce-controller-01. |
15 | - */ | 15 | + */ |
16 | -public class PcepLabelDownload { | 16 | +public class PcepLabelDownload { |
17 | - | 17 | + |
18 | - protected static final Logger log = LoggerFactory.getLogger(PcepLabelDownload.class); | 18 | + protected static final Logger log = LoggerFactory.getLogger(PcepLabelDownload.class); |
19 | - | 19 | + |
20 | - //PCEP SPR Object | 20 | + //PCEP SPR Object |
21 | - PcepSrpObject srpObject; | 21 | + PcepSrpObject srpObject; |
22 | - //PCEP LSP Object | 22 | + //PCEP LSP Object |
23 | - PcepLspObject lspObject; | 23 | + PcepLspObject lspObject; |
24 | - //LinkList of Labels | 24 | + //LinkList of Labels |
25 | - LinkedList<PcepLabelObject> llLabelList; | 25 | + LinkedList<PcepLabelObject> llLabelList; |
26 | - | 26 | + |
27 | - /* | 27 | + /* |
28 | - * Returns SRP Object. | 28 | + * Returns SRP Object. |
29 | - * | 29 | + * |
30 | - * @return PCEP SRP Object | 30 | + * @return PCEP SRP Object |
31 | - */ | 31 | + */ |
32 | - public PcepSrpObject getSrpObject() { | 32 | + public PcepSrpObject getSrpObject() { |
33 | - return srpObject; | 33 | + return srpObject; |
34 | - } | 34 | + } |
35 | - | 35 | + |
36 | - /* | 36 | + /* |
37 | - * Sets the Pcep Srp Object. | 37 | + * Sets the Pcep Srp Object. |
38 | - * | 38 | + * |
39 | - * @param srpobj PCEP SRP Object | 39 | + * @param srpobj PCEP SRP Object |
40 | - */ | 40 | + */ |
41 | - public void setSrpObject(PcepSrpObject srpobj) { | 41 | + public void setSrpObject(PcepSrpObject srpobj) { |
42 | - this.srpObject = srpobj; | 42 | + this.srpObject = srpobj; |
43 | - } | 43 | + } |
44 | - | 44 | + |
45 | - /* | 45 | + /* |
46 | - * Returns LSP Object. | 46 | + * Returns LSP Object. |
47 | - * | 47 | + * |
48 | - * @return PCEP LSP Object | 48 | + * @return PCEP LSP Object |
49 | - */ | 49 | + */ |
50 | - public PcepLspObject getLspObject() { | 50 | + public PcepLspObject getLspObject() { |
51 | - return lspObject; | 51 | + return lspObject; |
52 | - } | 52 | + } |
53 | - | 53 | + |
54 | - /* | 54 | + /* |
55 | - * Sets the Pcep LSP Object. | 55 | + * Sets the Pcep LSP Object. |
56 | - * | 56 | + * |
57 | - * @param lspObject PCEP LSP Object | 57 | + * @param lspObject PCEP LSP Object |
58 | - */ | 58 | + */ |
59 | - public void setLspObject(PcepLspObject lspObject) { | 59 | + public void setLspObject(PcepLspObject lspObject) { |
60 | - this.lspObject = lspObject; | 60 | + this.lspObject = lspObject; |
61 | - } | 61 | + } |
62 | - | 62 | + |
63 | - /* | 63 | + /* |
64 | - * Returns a list of labels. | 64 | + * Returns a list of labels. |
65 | - * | 65 | + * |
66 | - * @return llLabelList list of pcep label objects | 66 | + * @return llLabelList list of pcep label objects |
67 | - */ | 67 | + */ |
68 | - public LinkedList<PcepLabelObject> getLabelList() { | 68 | + public LinkedList<PcepLabelObject> getLabelList() { |
69 | - return llLabelList; | 69 | + return llLabelList; |
70 | - } | 70 | + } |
71 | - | 71 | + |
72 | - /* | 72 | + /* |
73 | - * set the llLabelList list of type PcepLableObject. | 73 | + * set the llLabelList list of type PcepLableObject. |
74 | - * | 74 | + * |
75 | - * @param llLabelList list of pcep label objects | 75 | + * @param llLabelList list of pcep label objects |
76 | - */ | 76 | + */ |
77 | - public void setLabelList(LinkedList<PcepLabelObject> llLabelList) { | 77 | + public void setLabelList(LinkedList<PcepLabelObject> llLabelList) { |
78 | - this.llLabelList = llLabelList; | 78 | + this.llLabelList = llLabelList; |
79 | - } | 79 | + } |
80 | - | 80 | + |
81 | - /* | 81 | + /* |
82 | - * Prints the attribute of PcepLableObject. | 82 | + * Prints the attribute of PcepLableObject. |
83 | - */ | 83 | + */ |
84 | - public void print() { | 84 | + public void print() { |
85 | - log.debug("LABEL DOWNLOAD:"); | 85 | + log.debug("LABEL DOWNLOAD:"); |
86 | - srpObject.print(); | 86 | + srpObject.print(); |
87 | - lspObject.print(); | 87 | + lspObject.print(); |
88 | - | 88 | + |
89 | - log.debug("label-list:"); | 89 | + log.debug("label-list:"); |
90 | - ListIterator<PcepLabelObject> listIterator = llLabelList.listIterator(); | 90 | + ListIterator<PcepLabelObject> listIterator = llLabelList.listIterator(); |
91 | - while (listIterator.hasNext()) { | 91 | + while (listIterator.hasNext()) { |
92 | - listIterator.next().print(); | 92 | + listIterator.next().print(); |
93 | - } | 93 | + } |
94 | - } | 94 | + } |
95 | -} | 95 | +} | ... | ... |
1 | -/* | 1 | +/* |
2 | - * Copyright 2015 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | - * | 3 | + * |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | - * you may not use this file except in compliance with 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 | 6 | + * You may obtain a copy of the License at |
7 | - * | 7 | + * |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | - * | 9 | + * |
10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
14 | - * limitations under the License. | 14 | + * limitations under the License. |
15 | - */ | 15 | + */ |
16 | - | 16 | + |
17 | -package org.onosproject.pcepio.types; | 17 | +package org.onosproject.pcepio.types; |
18 | - | 18 | + |
19 | -import org.onosproject.pcepio.protocol.PcepFecObject; | 19 | +import org.onosproject.pcepio.protocol.PcepFecObject; |
20 | -import org.onosproject.pcepio.protocol.PcepLabelObject; | 20 | +import org.onosproject.pcepio.protocol.PcepLabelObject; |
21 | -import org.onosproject.pcepio.protocol.PcepSrpObject; | 21 | +import org.onosproject.pcepio.protocol.PcepSrpObject; |
22 | -import org.slf4j.Logger; | 22 | +import org.slf4j.Logger; |
23 | -import org.slf4j.LoggerFactory; | 23 | +import org.slf4j.LoggerFactory; |
24 | - | 24 | + |
25 | -/** | 25 | +/** |
26 | - * Provide PCEP Label Map. | 26 | + * Provide PCEP Label Map. |
27 | - * Reference :draft-zhao-pce-pcep-extension-for-pce-controller-01. | 27 | + * Reference :draft-zhao-pce-pcep-extension-for-pce-controller-01. |
28 | - */ | 28 | + */ |
29 | -public class PcepLabelMap { | 29 | +public class PcepLabelMap { |
30 | - | 30 | + |
31 | - protected static final Logger log = LoggerFactory.getLogger(PcepLabelMap.class); | 31 | + protected static final Logger log = LoggerFactory.getLogger(PcepLabelMap.class); |
32 | - //PCEP SRP Object | 32 | + //PCEP SRP Object |
33 | - PcepSrpObject srpObject; | 33 | + PcepSrpObject srpObject; |
34 | - //PCEP Label Object | 34 | + //PCEP Label Object |
35 | - PcepLabelObject labelObject; | 35 | + PcepLabelObject labelObject; |
36 | - //PCEP FEC Object | 36 | + //PCEP FEC Object |
37 | - PcepFecObject fecObject; | 37 | + PcepFecObject fecObject; |
38 | - | 38 | + |
39 | - /** | 39 | + /** |
40 | - * Sets Fec Object. | 40 | + * Sets Fec Object. |
41 | - * | 41 | + * |
42 | - * @param fecObject PCEP fec object | 42 | + * @param fecObject PCEP fec object |
43 | - */ | 43 | + */ |
44 | - public void setFECObject(PcepFecObject fecObject) { | 44 | + public void setFECObject(PcepFecObject fecObject) { |
45 | - this.fecObject = fecObject; | 45 | + this.fecObject = fecObject; |
46 | - } | 46 | + } |
47 | - | 47 | + |
48 | - /** | 48 | + /** |
49 | - * Returns the PcepFecObject. | 49 | + * Returns the PcepFecObject. |
50 | - * | 50 | + * |
51 | - * @return PCEP fec object | 51 | + * @return PCEP fec object |
52 | - */ | 52 | + */ |
53 | - public PcepFecObject getFECObject() { | 53 | + public PcepFecObject getFECObject() { |
54 | - return this.fecObject; | 54 | + return this.fecObject; |
55 | - } | 55 | + } |
56 | - | 56 | + |
57 | - /** | 57 | + /** |
58 | - * Returns SRP Object. | 58 | + * Returns SRP Object. |
59 | - * | 59 | + * |
60 | - * @return PCEP SRP Object | 60 | + * @return PCEP SRP Object |
61 | - */ | 61 | + */ |
62 | - public PcepSrpObject getSrpObject() { | 62 | + public PcepSrpObject getSrpObject() { |
63 | - return srpObject; | 63 | + return srpObject; |
64 | - } | 64 | + } |
65 | - | 65 | + |
66 | - /** | 66 | + /** |
67 | - * Sets the PCEP Srp Object. | 67 | + * Sets the PCEP Srp Object. |
68 | - * | 68 | + * |
69 | - * @param srpObject PCEP SRP Object | 69 | + * @param srpObject PCEP SRP Object |
70 | - */ | 70 | + */ |
71 | - public void setSrpObject(PcepSrpObject srpObject) { | 71 | + public void setSrpObject(PcepSrpObject srpObject) { |
72 | - this.srpObject = srpObject; | 72 | + this.srpObject = srpObject; |
73 | - } | 73 | + } |
74 | - | 74 | + |
75 | - /** | 75 | + /** |
76 | - * Returns labelObject. | 76 | + * Returns labelObject. |
77 | - * | 77 | + * |
78 | - * @return PCEP label object | 78 | + * @return PCEP label object |
79 | - */ | 79 | + */ |
80 | - public PcepLabelObject getLabelObject() { | 80 | + public PcepLabelObject getLabelObject() { |
81 | - return labelObject; | 81 | + return labelObject; |
82 | - } | 82 | + } |
83 | - | 83 | + |
84 | - /** | 84 | + /** |
85 | - * Sets the Pcep labelObject. | 85 | + * Sets the Pcep labelObject. |
86 | - * | 86 | + * |
87 | - * @param labelObject PCEP label object | 87 | + * @param labelObject PCEP label object |
88 | - */ | 88 | + */ |
89 | - public void setLabelObject(PcepLabelObject labelObject) { | 89 | + public void setLabelObject(PcepLabelObject labelObject) { |
90 | - this.labelObject = labelObject; | 90 | + this.labelObject = labelObject; |
91 | - } | 91 | + } |
92 | - | 92 | + |
93 | - /** | 93 | + /** |
94 | - * Prints the attribute of PcepLabelMap. | 94 | + * Prints the attribute of PcepLabelMap. |
95 | - */ | 95 | + */ |
96 | - public void print() { | 96 | + public void print() { |
97 | - log.debug("LABEL MAP:"); | 97 | + log.debug("LABEL MAP:"); |
98 | - srpObject.print(); | 98 | + srpObject.print(); |
99 | - labelObject.print(); | 99 | + labelObject.print(); |
100 | - fecObject.print(); | 100 | + fecObject.print(); |
101 | - } | 101 | + } |
102 | -} | 102 | +} | ... | ... |
-
Please register or login to post a comment