Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +0530 | [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 | */
|
| 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 |
|
| 25 | /**
|
| 26 | * Provide PCEP Label Map.
|
| 27 | * Reference :draft-zhao-pce-pcep-extension-for-pce-controller-01.
|
| 28 | */
|
| 29 | public class PcepLabelMap {
|
| 30 |
|
| 31 | protected static final Logger log = LoggerFactory.getLogger(PcepLabelMap.class);
|
| 32 | //PCEP SRP Object
|
| 33 | PcepSrpObject srpObject;
|
| 34 | //PCEP Label Object
|
| 35 | PcepLabelObject labelObject;
|
| 36 | //PCEP FEC Object
|
| 37 | PcepFecObject fecObject;
|
| 38 |
|
| 39 | /**
|
| 40 | * Sets Fec Object.
|
| 41 | *
|
| 42 | * @param fecObject PCEP fec object
|
| 43 | */
|
| 44 | public void setFECObject(PcepFecObject fecObject) {
|
| 45 | this.fecObject = fecObject;
|
| 46 | }
|
| 47 |
|
| 48 | /**
|
| 49 | * Returns the PcepFecObject.
|
| 50 | *
|
| 51 | * @return PCEP fec object
|
| 52 | */
|
| 53 | public PcepFecObject getFECObject() {
|
| 54 | return this.fecObject;
|
| 55 | }
|
| 56 |
|
| 57 | /**
|
| 58 | * Returns SRP Object.
|
| 59 | *
|
| 60 | * @return PCEP SRP Object
|
| 61 | */
|
| 62 | public PcepSrpObject getSrpObject() {
|
| 63 | return srpObject;
|
| 64 | }
|
| 65 |
|
| 66 | /**
|
| 67 | * Sets the PCEP Srp Object.
|
| 68 | *
|
| 69 | * @param srpObject PCEP SRP Object
|
| 70 | */
|
| 71 | public void setSrpObject(PcepSrpObject srpObject) {
|
| 72 | this.srpObject = srpObject;
|
| 73 | }
|
| 74 |
|
| 75 | /**
|
| 76 | * Returns labelObject.
|
| 77 | *
|
| 78 | * @return PCEP label object
|
| 79 | */
|
| 80 | public PcepLabelObject getLabelObject() {
|
| 81 | return labelObject;
|
| 82 | }
|
| 83 |
|
| 84 | /**
|
| 85 | * Sets the Pcep labelObject.
|
| 86 | *
|
| 87 | * @param labelObject PCEP label object
|
| 88 | */
|
| 89 | public void setLabelObject(PcepLabelObject labelObject) {
|
| 90 | this.labelObject = labelObject;
|
| 91 | }
|
| 92 |
|
| 93 | /**
|
| 94 | * Prints the attribute of PcepLabelMap.
|
| 95 | */
|
| 96 | public void print() {
|
| 97 | log.debug("LABEL MAP:");
|
| 98 | srpObject.print();
|
| 99 | labelObject.print();
|
| 100 | fecObject.print();
|
| 101 | }
|
| 102 | }
|