Sho SHIMIZU
Committed by Gerrit Code Review

Use LF (Line Feed) as line separator

Change-Id: I052ab6da04e418bb6bcb4aa1d3d6648dcfd14f6c
Showing 26 changed files with 2426 additions and 2426 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 -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 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.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 +}
......