Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | * or more contributor license agreements. See the NOTICE file |
| 4 | * distributed with this work for additional information |
| 5 | * regarding copyright ownership. The ASF licenses this file |
| 6 | * to you under the Apache License, Version 2.0 (the |
| 7 | * "License"); you may not use this file except in compliance |
| 8 | * with the License. You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, |
| 13 | * software distributed under the License is distributed on an |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | * KIND, either express or implied. See the License for the |
| 16 | * specific language governing permissions and limitations |
| 17 | * under the License. |
| 18 | */ |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 19 | package org.onlab.onos.optical.cfg; |
| 20 | |
| 21 | /** |
| 22 | * Packet-optical link Java data object. |
| 23 | */ |
| 24 | class 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() { |
| 41 | // TODO Auto-generated constructor stub |
| 42 | } |
| 43 | |
| 44 | public void setSrcNodeName(String name) { |
| 45 | this.srcNodeName = name; |
| 46 | } |
| 47 | |
| 48 | public String getSrcNodeName() { |
| 49 | return this.srcNodeName; |
| 50 | } |
| 51 | |
| 52 | public void setSnkNodeName(String name) { |
| 53 | this.snkNodeName = name; |
| 54 | } |
| 55 | |
| 56 | public String getSnkNodeName() { |
| 57 | return this.snkNodeName; |
| 58 | } |
| 59 | |
| 60 | public void setSrcNodeId(String nodeId) { |
| 61 | this.srcNodeId = nodeId; |
| 62 | } |
| 63 | |
| 64 | public String getSrcNodeId() { |
| 65 | return this.srcNodeId; |
| 66 | } |
| 67 | |
| 68 | public void setSnkNodeId(String nodeId) { |
| 69 | this.snkNodeId = nodeId; |
| 70 | } |
| 71 | |
| 72 | public String getSnkNodeId() { |
| 73 | return this.snkNodeId; |
| 74 | } |
| 75 | |
| 76 | public void setSrcPort(int port) { |
| 77 | this.srcPort = port; |
| 78 | } |
| 79 | |
| 80 | public int getSrcPort() { |
| 81 | return this.srcPort; |
| 82 | } |
| 83 | |
| 84 | public void setSnkPort(int port) { |
| 85 | this.snkPort = port; |
| 86 | } |
| 87 | |
| 88 | public int getSnkPort() { |
| 89 | return this.snkPort; |
| 90 | } |
| 91 | |
| 92 | public void setBandwdith(double x) { |
| 93 | this.bandwidth = x; |
| 94 | } |
| 95 | |
| 96 | public double getBandwidth() { |
| 97 | return this.bandwidth; |
| 98 | } |
| 99 | |
| 100 | public void setCost(double x) { |
| 101 | this.cost = x; |
| 102 | } |
| 103 | |
| 104 | public double getCost() { |
| 105 | return this.cost; |
| 106 | } |
| 107 | |
| 108 | public void setAdminWeight(long x) { |
| 109 | this.adminWeight = x; |
| 110 | } |
| 111 | |
| 112 | public long getAdminWeight() { |
| 113 | return this.adminWeight; |
| 114 | } |
| 115 | |
| 116 | @Override |
| 117 | public String toString() { |
| 118 | return new StringBuilder(" srcNodeName: ").append(this.srcNodeName) |
| 119 | .append(" snkNodeName: ").append(this.snkNodeName) |
| 120 | .append(" srcNodeId: ").append(this.srcNodeId) |
| 121 | .append(" snkNodeId: ").append(this.snkNodeId) |
| 122 | .append(" srcPort: ").append(this.srcPort) |
| 123 | .append(" snkPort: ").append(this.snkPort) |
| 124 | .append(" bandwidth: ").append(this.bandwidth) |
| 125 | .append(" cost: ").append(this.cost) |
| 126 | .append(" adminWeight: ").append(this.adminWeight).toString(); |
| 127 | } |
| 128 | } |