blob: 4d1e71ecb637069e41a081d501b78f873cec8d65 [file] [log] [blame]
Toshio Koidead17d5e2014-02-11 11:36:02 -08001package net.onrc.onos.intent;
2
3import net.onrc.onos.ofcontroller.networkgraph.Path;
4
5/**
6 * @author Toshio Koide (t-koide@onlab.us)
7 */
8public class PathIntent extends Intent {
9 protected Path path;
Toshio Koide0e4d8d22014-02-14 10:56:10 -080010 protected double bandwidth;
Toshio Koidead17d5e2014-02-11 11:36:02 -080011 protected Intent parentIntent;
Toshio Koide13986d12014-02-11 20:25:32 -080012 protected int id;
Toshio Koidead17d5e2014-02-11 11:36:02 -080013
14 /**
15 *
16 * @param graph
17 * @param path
18 * @param bandwidth bandwidth which should be allocated for the path.
Toshio Koide0e4d8d22014-02-14 10:56:10 -080019 * If 0, no intent for bandwidth allocation (best effort).
20 * @param parentIntent parent intent. If null, this is root intent.
Toshio Koide13986d12014-02-11 20:25:32 -080021 * @param id
Toshio Koidead17d5e2014-02-11 11:36:02 -080022 */
Toshio Koide0e4d8d22014-02-14 10:56:10 -080023 public PathIntent(String id, Path path, double bandwidth, Intent parentIntent) {
Toshio Koide13986d12014-02-11 20:25:32 -080024 super(id);
Toshio Koidead17d5e2014-02-11 11:36:02 -080025 this.path = path;
26 this.bandwidth = bandwidth;
27 this.parentIntent = parentIntent;
28 }
29
30 public Double getBandwidth() {
31 return bandwidth;
32 }
33
34 public Path getPath() {
35 return path;
36 }
37
38 public Intent getParentIntent() {
39 return parentIntent;
40 }
Toshio Koidead17d5e2014-02-11 11:36:02 -080041}