Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [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.types; |
| 18 | |
| 19 | import org.onosproject.pcepio.protocol.PcepFecObject; |
| 20 | import org.onosproject.pcepio.protocol.PcepLabelObject; |
| 21 | import org.onosproject.pcepio.protocol.PcepSrpObject; |
| 22 | import org.slf4j.Logger; |
| 23 | import org.slf4j.LoggerFactory; |
| 24 | |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 25 | import com.google.common.base.MoreObjects; |
| 26 | |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 27 | /** |
| 28 | * Provide PCEP Label Map. |
| 29 | * Reference :draft-zhao-pce-pcep-extension-for-pce-controller-01. |
| 30 | */ |
| 31 | public class PcepLabelMap { |
| 32 | |
| 33 | protected static final Logger log = LoggerFactory.getLogger(PcepLabelMap.class); |
| 34 | //PCEP SRP Object |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 35 | private PcepSrpObject srpObject; |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 36 | //PCEP Label Object |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 37 | private PcepLabelObject labelObject; |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 38 | //PCEP FEC Object |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 39 | private PcepFecObject fecObject; |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 40 | |
| 41 | /** |
| 42 | * Sets Fec Object. |
| 43 | * |
| 44 | * @param fecObject PCEP fec object |
| 45 | */ |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 46 | public void setFecObject(PcepFecObject fecObject) { |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 47 | this.fecObject = fecObject; |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Returns the PcepFecObject. |
| 52 | * |
| 53 | * @return PCEP fec object |
| 54 | */ |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 55 | public PcepFecObject getFecObject() { |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 56 | return this.fecObject; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Returns SRP Object. |
| 61 | * |
| 62 | * @return PCEP SRP Object |
| 63 | */ |
| 64 | public PcepSrpObject getSrpObject() { |
| 65 | return srpObject; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Sets the PCEP Srp Object. |
| 70 | * |
| 71 | * @param srpObject PCEP SRP Object |
| 72 | */ |
| 73 | public void setSrpObject(PcepSrpObject srpObject) { |
| 74 | this.srpObject = srpObject; |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * Returns labelObject. |
| 79 | * |
| 80 | * @return PCEP label object |
| 81 | */ |
| 82 | public PcepLabelObject getLabelObject() { |
| 83 | return labelObject; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Sets the Pcep labelObject. |
| 88 | * |
| 89 | * @param labelObject PCEP label object |
| 90 | */ |
| 91 | public void setLabelObject(PcepLabelObject labelObject) { |
| 92 | this.labelObject = labelObject; |
| 93 | } |
| 94 | |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 95 | @Override |
| 96 | public String toString() { |
| 97 | return MoreObjects.toStringHelper(getClass()) |
bharat saraswal | e180630 | 2015-08-21 12:16:46 +0530 | [diff] [blame] | 98 | .add("SrpObject", srpObject) |
| 99 | .add("LabelObject", labelObject) |
| 100 | .add("FecObject", fecObject) |
bharat saraswal | f7364db | 2015-08-11 13:39:31 +0530 | [diff] [blame] | 101 | .toString(); |
| 102 | } |
Sho SHIMIZU | 74361c1 | 2015-08-11 12:31:48 -0700 | [diff] [blame] | 103 | } |