Mahesh Poojary S | f1bbd36 | 2016-02-25 18:19:59 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame^] | 2 | * Copyright 2016-present Open Networking Laboratory |
Mahesh Poojary S | f1bbd36 | 2016-02-25 18:19:59 +0530 | [diff] [blame] | 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 | |
| 17 | package org.onosproject.pcepio.protocol; |
| 18 | |
| 19 | import java.util.List; |
| 20 | |
| 21 | import org.jboss.netty.buffer.ChannelBuffer; |
| 22 | import org.onosproject.pcepio.exceptions.PcepParseException; |
| 23 | |
| 24 | /** |
| 25 | * Abstraction of an entity providing PCEP LS-Report Message. |
| 26 | */ |
| 27 | public interface PcepLSReportMsg extends PcepObject, PcepMessage { |
| 28 | |
| 29 | @Override |
| 30 | PcepVersion getVersion(); |
| 31 | |
| 32 | @Override |
| 33 | PcepType getType(); |
| 34 | |
| 35 | /** |
| 36 | * Returns list of PCEP LS Objects. |
| 37 | * |
| 38 | * @return list of PCEP LS Objects |
| 39 | */ |
| 40 | List<PcepLSObject> getLSReportList(); |
| 41 | |
| 42 | /** |
| 43 | * Sets list of Optional Tlvs in LS-Report Message. |
| 44 | * |
| 45 | * @param lsReportList list of optional Tlvs |
| 46 | */ |
| 47 | void setLSReportList(List<PcepLSObject> lsReportList); |
| 48 | |
| 49 | @Override |
| 50 | void writeTo(ChannelBuffer channelBuffer) throws PcepParseException; |
| 51 | |
| 52 | /** |
| 53 | * Builder interface with get and set functions to build LS-Report message. |
| 54 | */ |
| 55 | interface Builder extends PcepMessage.Builder { |
| 56 | |
| 57 | @Override |
| 58 | PcepLSReportMsg build(); |
| 59 | |
| 60 | @Override |
| 61 | PcepVersion getVersion(); |
| 62 | |
| 63 | @Override |
| 64 | PcepType getType(); |
| 65 | |
| 66 | /** |
| 67 | * Returns list of LS Object in LS Report Message. |
| 68 | * |
| 69 | * @return list of LS Objects |
| 70 | */ |
| 71 | List<PcepLSObject> getLSReportList(); |
| 72 | |
| 73 | /** |
| 74 | * Sets list of LS Objects and returns its builder. |
| 75 | * |
| 76 | * @param lsReportList list of LS Objects |
| 77 | * @return Builder object for LS-Report message |
| 78 | */ |
| 79 | Builder setLSReportList(List<PcepLSObject> lsReportList); |
| 80 | } |
| 81 | } |