Toshio Koide | ad17d5e | 2014-02-11 11:36:02 -0800 | [diff] [blame] | 1 | package net.onrc.onos.intent; |
| 2 | |
| 3 | import net.onrc.onos.ofcontroller.networkgraph.Path; |
| 4 | |
| 5 | /** |
| 6 | * @author Toshio Koide (t-koide@onlab.us) |
| 7 | */ |
| 8 | public class PathIntent extends Intent { |
| 9 | protected Path path; |
| 10 | protected Double bandwidth; |
| 11 | protected Intent parentIntent; |
Toshio Koide | 13986d1 | 2014-02-11 20:25:32 -0800 | [diff] [blame] | 12 | protected int id; |
Toshio Koide | ad17d5e | 2014-02-11 11:36:02 -0800 | [diff] [blame] | 13 | |
| 14 | /** |
| 15 | * |
| 16 | * @param graph |
| 17 | * @param path |
| 18 | * @param bandwidth bandwidth which should be allocated for the path. |
| 19 | * If null, it means no intent for bandwidth allocation (best effort). |
| 20 | * @param parentIntent parent intent. If null, it means this is root intent. |
Toshio Koide | 13986d1 | 2014-02-11 20:25:32 -0800 | [diff] [blame] | 21 | * @param id |
Toshio Koide | ad17d5e | 2014-02-11 11:36:02 -0800 | [diff] [blame] | 22 | */ |
Toshio Koide | 13986d1 | 2014-02-11 20:25:32 -0800 | [diff] [blame] | 23 | public PathIntent(String id, Path path, Double bandwidth, Intent parentIntent) { |
| 24 | super(id); |
Toshio Koide | ad17d5e | 2014-02-11 11:36:02 -0800 | [diff] [blame] | 25 | 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 | } |
| 41 | } |