blob: 1661c0290035595d1cceb830c7ec1cefc43ac445 [file] [log] [blame]
Jonathan Hartaa380972014-04-03 10:24:46 -07001package net.onrc.onos.core.intent;
Toshio Koidead17d5e2014-02-11 11:36:02 -08002
Toshio Koidead17d5e2014-02-11 11:36:02 -08003/**
4 * @author Toshio Koide (t-koide@onlab.us)
5 */
6public class ConstrainedShortestPathIntent extends ShortestPathIntent {
Ray Milkey269ffb92014-04-03 14:43:30 -07007 protected double bandwidth;
Toshio Koidead17d5e2014-02-11 11:36:02 -08008
Ray Milkey269ffb92014-04-03 14:43:30 -07009 /**
Ray Milkeyb41100a2014-04-10 10:42:15 -070010 * Default constructor for Kryo deserialization.
Ray Milkey269ffb92014-04-03 14:43:30 -070011 */
12 protected ConstrainedShortestPathIntent() {
13 }
Toshio Koidec406e792014-02-14 16:52:42 -080014
Ray Milkeya5450cc2014-04-17 14:31:30 -070015 // CHECKSTYLE:OFF suppress the warning about too many parameters
Ray Milkey269ffb92014-04-03 14:43:30 -070016 public ConstrainedShortestPathIntent(String id,
17 long srcSwitch, long srcPort, long srcMac,
18 long dstSwitch, long dstPort, long dstMac,
19 double bandwidth) {
Ray Milkeya5450cc2014-04-17 14:31:30 -070020 // CHECKSTYLE:ON
Ray Milkey269ffb92014-04-03 14:43:30 -070021 super(id, srcSwitch, srcPort, srcMac, dstSwitch, dstPort, dstMac);
22 this.bandwidth = bandwidth;
23 }
Toshio Koidead17d5e2014-02-11 11:36:02 -080024
Ray Milkey269ffb92014-04-03 14:43:30 -070025 public double getBandwidth() {
26 return bandwidth;
27 }
Pavlin Radoslavov7fb16412014-04-11 18:45:19 -070028
29 @Override
30 public int hashCode() {
31 // TODO: Is this the intended behavior?
32 return (super.hashCode());
33 }
34
35 @Override
36 public boolean equals(Object obj) {
37 // TODO: Is this the intended behavior?
38 return (super.equals(obj));
39 }
Toshio Koidead17d5e2014-02-11 11:36:02 -080040}