Thomas Vachuska | 58de416 | 2015-09-10 16:15:33 -0700 | [diff] [blame] | 1 | /* |
| 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 | */ |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 16 | package org.onosproject.pcepio.types; |
| 17 | |
| 18 | import java.util.LinkedList; |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 19 | |
| 20 | import org.onosproject.pcepio.protocol.PcepLabelObject; |
| 21 | import org.onosproject.pcepio.protocol.PcepLspObject; |
| 22 | import org.onosproject.pcepio.protocol.PcepSrpObject; |
| 23 | import org.slf4j.Logger; |
| 24 | import org.slf4j.LoggerFactory; |
| 25 | |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 26 | import com.google.common.base.MoreObjects; |
| 27 | |
| 28 | /** |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 29 | * Provides Pcep Label. |
| 30 | * REference :draft-zhao-pce-pcep-extension-for-pce-controller-01. |
| 31 | */ |
| 32 | public class PcepLabelDownload { |
| 33 | |
| 34 | protected static final Logger log = LoggerFactory.getLogger(PcepLabelDownload.class); |
| 35 | |
| 36 | //PCEP SPR Object |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 37 | private PcepSrpObject srpObject; |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 38 | //PCEP LSP Object |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 39 | private PcepLspObject lspObject; |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 40 | //LinkList of Labels |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 41 | private LinkedList<PcepLabelObject> llLabelList; |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 42 | |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 43 | /** |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 44 | * Returns SRP Object. |
| 45 | * |
| 46 | * @return PCEP SRP Object |
| 47 | */ |
| 48 | public PcepSrpObject getSrpObject() { |
| 49 | return srpObject; |
| 50 | } |
| 51 | |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 52 | /** |
bharat saraswal | e180630 | 2015-08-21 12:16:46 +0530 | [diff] [blame] | 53 | * Sets the Pcep SRP Object. |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 54 | * |
| 55 | * @param srpobj PCEP SRP Object |
| 56 | */ |
| 57 | public void setSrpObject(PcepSrpObject srpobj) { |
| 58 | this.srpObject = srpobj; |
| 59 | } |
| 60 | |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 61 | /** |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 62 | * Returns LSP Object. |
| 63 | * |
| 64 | * @return PCEP LSP Object |
| 65 | */ |
| 66 | public PcepLspObject getLspObject() { |
| 67 | return lspObject; |
| 68 | } |
| 69 | |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 70 | /** |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 71 | * Sets the Pcep LSP Object. |
| 72 | * |
| 73 | * @param lspObject PCEP LSP Object |
| 74 | */ |
| 75 | public void setLspObject(PcepLspObject lspObject) { |
| 76 | this.lspObject = lspObject; |
| 77 | } |
| 78 | |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 79 | /** |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 80 | * Returns a list of labels. |
| 81 | * |
| 82 | * @return llLabelList list of pcep label objects |
| 83 | */ |
| 84 | public LinkedList<PcepLabelObject> getLabelList() { |
| 85 | return llLabelList; |
| 86 | } |
| 87 | |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 88 | /** |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 89 | * set the llLabelList list of type PcepLableObject. |
| 90 | * |
| 91 | * @param llLabelList list of pcep label objects |
| 92 | */ |
| 93 | public void setLabelList(LinkedList<PcepLabelObject> llLabelList) { |
| 94 | this.llLabelList = llLabelList; |
| 95 | } |
| 96 | |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 97 | @Override |
| 98 | public String toString() { |
Sho SHIMIZU | 7cdbcf7 | 2015-09-03 14:43:05 -0700 | [diff] [blame] | 99 | return MoreObjects.toStringHelper(getClass()) |
| 100 | .add("SrpObject", srpObject) |
| 101 | .add("LspObject", lspObject) |
| 102 | .add("LabelObjectList", llLabelList) |
| 103 | .toString(); |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 104 | } |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 105 | } |