blob: f76a058453092b46a4cf4e1a0e87001414f13472 [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuska781d18b2014-10-27 10:31:25 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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
Thomas Vachuska781d18b2014-10-27 10:31:25 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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.
Thomas Vachuska781d18b2014-10-27 10:31:25 -070015 */
weibit38c42ed2014-10-09 19:03:54 -070016package org.onlab.onos.optical.cfg;
17
18/**
19 * Packet-optical link Java data object.
20 */
21class PktOptLink {
22 private String srcNodeName;
23 private String snkNodeName;
24 private String srcNodeId;
25 private String snkNodeId;
26 private int srcPort;
27 private int snkPort;
28 private double bandwidth;
29 private double cost;
30 private long adminWeight;
31
32 public PktOptLink(String srcName, String snkName) {
33 this.srcNodeName = srcName;
34 this.snkNodeName = snkName;
35 }
36
37 public PktOptLink() {
38 // TODO Auto-generated constructor stub
39 }
40
41 public void setSrcNodeName(String name) {
42 this.srcNodeName = name;
43 }
44
45 public String getSrcNodeName() {
46 return this.srcNodeName;
47 }
48
49 public void setSnkNodeName(String name) {
50 this.snkNodeName = name;
51 }
52
53 public String getSnkNodeName() {
54 return this.snkNodeName;
55 }
56
57 public void setSrcNodeId(String nodeId) {
58 this.srcNodeId = nodeId;
59 }
60
61 public String getSrcNodeId() {
62 return this.srcNodeId;
63 }
64
65 public void setSnkNodeId(String nodeId) {
66 this.snkNodeId = nodeId;
67 }
68
69 public String getSnkNodeId() {
70 return this.snkNodeId;
71 }
72
73 public void setSrcPort(int port) {
74 this.srcPort = port;
75 }
76
77 public int getSrcPort() {
78 return this.srcPort;
79 }
80
81 public void setSnkPort(int port) {
82 this.snkPort = port;
83 }
84
85 public int getSnkPort() {
86 return this.snkPort;
87 }
88
89 public void setBandwdith(double x) {
90 this.bandwidth = x;
91 }
92
93 public double getBandwidth() {
94 return this.bandwidth;
95 }
96
97 public void setCost(double x) {
98 this.cost = x;
99 }
100
101 public double getCost() {
102 return this.cost;
103 }
104
105 public void setAdminWeight(long x) {
106 this.adminWeight = x;
107 }
108
109 public long getAdminWeight() {
110 return this.adminWeight;
111 }
112
113 @Override
114 public String toString() {
115 return new StringBuilder(" srcNodeName: ").append(this.srcNodeName)
116 .append(" snkNodeName: ").append(this.snkNodeName)
117 .append(" srcNodeId: ").append(this.srcNodeId)
118 .append(" snkNodeId: ").append(this.snkNodeId)
119 .append(" srcPort: ").append(this.srcPort)
120 .append(" snkPort: ").append(this.snkPort)
121 .append(" bandwidth: ").append(this.bandwidth)
122 .append(" cost: ").append(this.cost)
123 .append(" adminWeight: ").append(this.adminWeight).toString();
124 }
125}