blob: a4217995d4d8ddca0b69d4efb78231792edbd6bf [file] [log] [blame]
Phaneendra Manda1c0061d2015-08-06 12:29:38 +05301/*
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
17package org.onosproject.pcepio.types;
18
19import org.onosproject.pcepio.protocol.PcepFecObject;
20import org.onosproject.pcepio.protocol.PcepLabelObject;
21import org.onosproject.pcepio.protocol.PcepSrpObject;
22import org.slf4j.Logger;
23import org.slf4j.LoggerFactory;
24
25/**
26 * Provide PCEP Label Map.
27 * Reference :draft-zhao-pce-pcep-extension-for-pce-controller-01.
28 */
29public 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}