blob: 0621cb06e2bdc8ad8796ff6fbf0f021a9dda2774 [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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.optical.cfg;
weibit38c42ed2014-10-09 19:03:54 -070017
18/**
19 * Packet-optical link Java data object.
Sho SHIMIZUbe63b232015-06-30 10:57:58 -070020 *
21 * @deprecated in Cardinal Release
weibit38c42ed2014-10-09 19:03:54 -070022 */
Thomas Vachuska112c7032014-11-16 11:05:14 -080023@Deprecated
weibit38c42ed2014-10-09 19:03:54 -070024class PktOptLink {
25 private String srcNodeName;
26 private String snkNodeName;
27 private String srcNodeId;
28 private String snkNodeId;
29 private int srcPort;
30 private int snkPort;
31 private double bandwidth;
32 private double cost;
33 private long adminWeight;
34
35 public PktOptLink(String srcName, String snkName) {
36 this.srcNodeName = srcName;
37 this.snkNodeName = snkName;
38 }
39
40 public PktOptLink() {
weibit38c42ed2014-10-09 19:03:54 -070041 }
42
43 public void setSrcNodeName(String name) {
44 this.srcNodeName = name;
45 }
46
47 public String getSrcNodeName() {
48 return this.srcNodeName;
49 }
50
51 public void setSnkNodeName(String name) {
52 this.snkNodeName = name;
53 }
54
55 public String getSnkNodeName() {
56 return this.snkNodeName;
57 }
58
59 public void setSrcNodeId(String nodeId) {
60 this.srcNodeId = nodeId;
61 }
62
63 public String getSrcNodeId() {
64 return this.srcNodeId;
65 }
66
67 public void setSnkNodeId(String nodeId) {
68 this.snkNodeId = nodeId;
69 }
70
71 public String getSnkNodeId() {
72 return this.snkNodeId;
73 }
74
75 public void setSrcPort(int port) {
76 this.srcPort = port;
77 }
78
79 public int getSrcPort() {
80 return this.srcPort;
81 }
82
83 public void setSnkPort(int port) {
84 this.snkPort = port;
85 }
86
87 public int getSnkPort() {
88 return this.snkPort;
89 }
90
91 public void setBandwdith(double x) {
92 this.bandwidth = x;
93 }
94
95 public double getBandwidth() {
96 return this.bandwidth;
97 }
98
99 public void setCost(double x) {
100 this.cost = x;
101 }
102
103 public double getCost() {
104 return this.cost;
105 }
106
107 public void setAdminWeight(long x) {
108 this.adminWeight = x;
109 }
110
111 public long getAdminWeight() {
112 return this.adminWeight;
113 }
114
115 @Override
116 public String toString() {
117 return new StringBuilder(" srcNodeName: ").append(this.srcNodeName)
118 .append(" snkNodeName: ").append(this.snkNodeName)
119 .append(" srcNodeId: ").append(this.srcNodeId)
120 .append(" snkNodeId: ").append(this.snkNodeId)
121 .append(" srcPort: ").append(this.srcPort)
122 .append(" snkPort: ").append(this.snkPort)
123 .append(" bandwidth: ").append(this.bandwidth)
124 .append(" cost: ").append(this.cost)
125 .append(" adminWeight: ").append(this.adminWeight).toString();
126 }
127}