blob: 5a0bce4c2339aa451a6f86dac4c94b592695e28d [file] [log] [blame]
Phaneendra Manda1c0061d2015-08-06 12:29:38 +05301/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.pcepio.protocol;
18
19import org.jboss.netty.buffer.ChannelBuffer;
20import org.onosproject.pcepio.exceptions.PcepParseException;
21
22/**
23 * Abstraction of an entity provides State Report for PCEP Report Message.
24 */
25public interface PcepStateReport {
26
27 /**
28 * Provides PCEP Message path for report message.
29 */
30 public interface PcepMsgPath {
31
32 /**
33 * Returns PcepEroObject.
34 *
35 * @return eroObj
36 */
37 PcepEroObject getEroObject();
38
39 /**
40 * Sets PcepEroObject.
41 *
42 * @param eroObject Ero Object
43 */
44 void setEroObject(PcepEroObject eroObject);
45
46 /**
47 * Returns PcepAttribute.
48 *
49 * @return attrList
50 */
51 PcepAttribute getPcepAttribute();
52
53 /**
54 * Sets PcepAttribute.
55 *
56 * @param pcepAttribute Pcep Attribute object
57 */
58 void setPcepAttribute(PcepAttribute pcepAttribute);
59
60 /**
61 * Returns PcepRroObject.
62 *
63 * @return rroObj
64 */
65 PcepRroObject getRroObject();
66
67 /**
68 * Sets PcepRroObject.
69 *
70 * @param rroObject Rro object
71 */
72 void setRroObject(PcepRroObject rroObject);
73
74 /**
75 * Returns PcepBandwidthObject.
76 *
77 * @return bandwidth object
78 */
79 PcepBandwidthObject getBandwidthObject();
80
81 /**
82 * Sets PcepBandwidthObject.
83 *
84 * @param bandwidth bandwidth object
85 */
86 void setBandwidthObject(PcepBandwidthObject bandwidth);
87
88 /**
89 * Reads all the Objects for PCEP Message Path.
90 *
91 * @param bb of type channel buffer
92 * @return PCEP Message path
93 * @throws PcepParseException when invalid buffer received
94 */
95 public PcepMsgPath read(ChannelBuffer bb) throws PcepParseException;
96
97 /**
98 * Writes all the objects for pcep message path.
99 *
100 * @param bb of type channel buffer.
101 * @return object length index
102 * @throws PcepParseException when mandatory object is not set
103 */
104 public int write(ChannelBuffer bb) throws PcepParseException;
105
106 /***
107 * Prints the attribute of PCEP Message Path.
108 */
109 public void print();
110
111 }
112
113 /**
114 * Returns PcepSrpObject.
115 *
116 * @return srpObject
117 */
118 PcepSrpObject getSrpObject();
119
120 /**
121 * Returns PcepLspObject.
122 *
123 * @return lspObject
124 */
125 PcepLspObject getLspObject();
126
127 /**
128 * Returns PcepMsgPath.
129 *
130 * @return msgPath
131 */
132 PcepMsgPath getMsgPath();
133
134 /**
135 * Sets the SRP Object.
136 *
137 * @param srpObj Pcep Srp Object
138 */
139 void setSrpObject(PcepSrpObject srpObj);
140
141 /**
142 * Sets the LSP Object.
143 *
144 * @param lspObject Pcep Lsp Object
145 */
146 void setLspObject(PcepLspObject lspObject);
147
148 /**
149 * Sets the Path Object.
150 *
151 * @param msgPath Pcep MsgPath object
152 */
153 void setMsgPath(PcepMsgPath msgPath);
154
155 /**
156 * Prints the attribute of PCEP state report.
157 */
158 public void print();
159
160 /**
161 * Builder interface with get and set functions to build PcepStateReport.
162 */
163 public interface Builder {
164
165 /**
166 * Builds PcepStateReport.
167 *
168 * @return PcepStateReport
169 * @throws PcepParseException when mandatory object is not set
170 */
171 PcepStateReport build() throws PcepParseException;
172
173 /**
174 * Returns PcepSrpObject.
175 *
176 * @return srpObject
177 */
178 PcepSrpObject getSrpObject();
179
180 /**
181 * Returns PcepLspObject.
182 *
183 * @return lspObject
184 */
185 PcepLspObject getLspObject();
186
187 /**
188 * Returns PcepMsgPath.
189 *
190 * @return msgPath
191 */
192 PcepMsgPath getMsgPath();
193
194 /**
195 * Sets the SRP Object.
196 *
197 * @param srpObj Pcep Srp Object
198 * @return builder by setting PcepSrpObject
199 */
200 Builder setSrpObject(PcepSrpObject srpObj);
201
202 /**
203 * Sets the LSP Object.
204 *
205 * @param lspObject Pcep Lsp Object
206 * @return builder by setting PcepLspObject
207 */
208 Builder setLspObject(PcepLspObject lspObject);
209
210 /**
211 * Sets the Path Object.
212 *
213 * @param msgPath Pcep MsgPath object
214 * @return builder by setting PcepMsgPath
215 */
216 Builder setMsgPath(PcepMsgPath msgPath);
217 }
218}