blob: 77273b0fd486821e0f273b8ece5cd3878ed312f2 [file] [log] [blame]
Sho SHIMIZU74361c12015-08-11 12:31:48 -07001/*
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
bharat saraswalf7364db2015-08-11 13:39:31 +053025import com.google.common.base.MoreObjects;
26
Sho SHIMIZU74361c12015-08-11 12:31:48 -070027/**
28 * Provide PCEP Label Map.
29 * Reference :draft-zhao-pce-pcep-extension-for-pce-controller-01.
30 */
31public class PcepLabelMap {
32
33 protected static final Logger log = LoggerFactory.getLogger(PcepLabelMap.class);
34 //PCEP SRP Object
bharat saraswalf7364db2015-08-11 13:39:31 +053035 private PcepSrpObject srpObject;
Sho SHIMIZU74361c12015-08-11 12:31:48 -070036 //PCEP Label Object
bharat saraswalf7364db2015-08-11 13:39:31 +053037 private PcepLabelObject labelObject;
Sho SHIMIZU74361c12015-08-11 12:31:48 -070038 //PCEP FEC Object
bharat saraswalf7364db2015-08-11 13:39:31 +053039 private PcepFecObject fecObject;
Sho SHIMIZU74361c12015-08-11 12:31:48 -070040
41 /**
42 * Sets Fec Object.
43 *
44 * @param fecObject PCEP fec object
45 */
Jonathan Hart51539b82015-10-29 09:53:04 -070046 public void setFecObject(PcepFecObject fecObject) {
Sho SHIMIZU74361c12015-08-11 12:31:48 -070047 this.fecObject = fecObject;
48 }
49
50 /**
51 * Returns the PcepFecObject.
52 *
53 * @return PCEP fec object
54 */
Jonathan Hart51539b82015-10-29 09:53:04 -070055 public PcepFecObject getFecObject() {
Sho SHIMIZU74361c12015-08-11 12:31:48 -070056 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 saraswalf7364db2015-08-11 13:39:31 +053095 @Override
96 public String toString() {
97 return MoreObjects.toStringHelper(getClass())
bharat saraswale1806302015-08-21 12:16:46 +053098 .add("SrpObject", srpObject)
99 .add("LabelObject", labelObject)
100 .add("FecObject", fecObject)
bharat saraswalf7364db2015-08-11 13:39:31 +0530101 .toString();
102 }
Sho SHIMIZU74361c12015-08-11 12:31:48 -0700103}