blob: 9a7fa8ab24810d46dda7e348a489142a2f217ebc [file] [log] [blame]
bharat saraswale1806302015-08-21 12:16:46 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
bharat saraswale1806302015-08-21 12:16:46 +05303 *
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
Sho SHIMIZU74361c12015-08-11 12:31:48 -070017package org.onosproject.pcepio.protocol;
18
19import org.jboss.netty.buffer.ChannelBuffer;
bharat saraswale1806302015-08-21 12:16:46 +053020import org.onosproject.pcepio.exceptions.PcepParseException;
Sho SHIMIZU74361c12015-08-11 12:31:48 -070021import org.onosproject.pcepio.types.ErrorObjListWithOpen;
22
23/**
24 * Abstraction of an entity providing PCEP Error Message.
25 */
26public interface PcepErrorMsg extends PcepMessage {
27
28 @Override
29 PcepVersion getVersion();
30
31 @Override
32 PcepType getType();
33
34 /**
35 * Returns Object of ErrorObjListWithOpen.
36 *
37 * @return Object of ErrorObjListWithOpen
38 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -070039 ErrorObjListWithOpen getErrorObjListWithOpen();
Sho SHIMIZU74361c12015-08-11 12:31:48 -070040
41 /**
42 * Sets errObjListWithOpen object.
43 *
44 * @param errObjListWithOpen error object List with open object
45 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -070046 void setErrorObjListWithOpen(ErrorObjListWithOpen errObjListWithOpen);
Sho SHIMIZU74361c12015-08-11 12:31:48 -070047
48 /**
49 * Returns Object of PcepErrorInfo.
50 *
51 * @return Object of PcepErrorInfo
52 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -070053 PcepErrorInfo getPcepErrorInfo();
Sho SHIMIZU74361c12015-08-11 12:31:48 -070054
55 /**
56 * Sets errInfo Object.
57 *
58 * @param errInfo error information
59 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -070060 void setPcepErrorInfo(PcepErrorInfo errInfo);
Sho SHIMIZU74361c12015-08-11 12:31:48 -070061
62 @Override
bharat saraswale1806302015-08-21 12:16:46 +053063 void writeTo(ChannelBuffer channelBuffer) throws PcepParseException;
Sho SHIMIZU74361c12015-08-11 12:31:48 -070064
65 /**
66 * Builder interface with get and set functions to build PCEP Error message.
67 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -070068 interface Builder extends PcepMessage.Builder {
Sho SHIMIZU74361c12015-08-11 12:31:48 -070069
70 @Override
71 PcepErrorMsg build();
72
73 @Override
74 PcepVersion getVersion();
75
76 @Override
77 PcepType getType();
78
79 /**
80 * Returns Object of ErrorObjListWithOpen.
81 *
82 * @return Object of ErrorObjListWithOpen
83 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -070084 ErrorObjListWithOpen getErrorObjListWithOpen();
Sho SHIMIZU74361c12015-08-11 12:31:48 -070085
86 /**
87 * Sets errObjListWithOpen object.
88 *
89 * @param errObjListWithOpen error object with open object
90 * @return builder by setting Object of ErrorObjListWithOpen
91 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -070092 Builder setErrorObjListWithOpen(ErrorObjListWithOpen errObjListWithOpen);
Sho SHIMIZU74361c12015-08-11 12:31:48 -070093
94 /**
95 * Returns Object of PcepErrorInfo.
96 *
97 * @return Object of PcepErrorInfo
98 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -070099 PcepErrorInfo getPcepErrorInfo();
Sho SHIMIZU74361c12015-08-11 12:31:48 -0700100
101 /**
102 * Sets errInfo Object.
103 *
104 * @param errInfo error information
105 * @return builder by getting Object of PcepErrorInfo
106 */
Sho SHIMIZU260f6ef2015-08-11 13:53:31 -0700107 Builder setPcepErrorInfo(PcepErrorInfo errInfo);
Sho SHIMIZU74361c12015-08-11 12:31:48 -0700108 }
109}