[104] | 1 | package schedframe.net.pce.topology; |
---|
| 2 | |
---|
| 3 | |
---|
| 4 | import java.util.ArrayList; |
---|
| 5 | import java.util.List; |
---|
| 6 | |
---|
| 7 | /** |
---|
| 8 | * Class representing virtual links between two nodes. |
---|
| 9 | * Please do not use this class to represent physical links, |
---|
| 10 | * try DataLink instead. |
---|
| 11 | * |
---|
| 12 | * @author Bartosz Belter <bartosz.belter at man.poznan.pl> |
---|
| 13 | * |
---|
| 14 | */ |
---|
| 15 | public class VirtualLink { |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | /** |
---|
| 19 | * Link Id |
---|
| 20 | */ |
---|
| 21 | String id; |
---|
| 22 | |
---|
| 23 | /** |
---|
| 24 | * Link end-point |
---|
| 25 | */ |
---|
| 26 | Node endpoint1; |
---|
| 27 | |
---|
| 28 | /** |
---|
| 29 | * Link end-point |
---|
| 30 | */ |
---|
| 31 | Node endpoint2; |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | /** |
---|
| 37 | * The calendar of TimeValue objects, representing bandwidth already used |
---|
| 38 | * or scheduled for future use |
---|
| 39 | */ |
---|
| 40 | protected List<AvailableBandwidth> calendar = new ArrayList<AvailableBandwidth>(); |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | public VirtualLink(String id, Node endpoint1, Node endpoint2) { |
---|
| 44 | super(); |
---|
| 45 | this.id = id; |
---|
| 46 | this.endpoint1 = endpoint1; |
---|
| 47 | this.endpoint2 = endpoint2; |
---|
| 48 | } |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | /** |
---|
| 52 | * @return the id |
---|
| 53 | */ |
---|
| 54 | public String getId() { |
---|
| 55 | return id; |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | /** |
---|
| 59 | * @param id the id to set |
---|
| 60 | */ |
---|
| 61 | public void setId(String id) { |
---|
| 62 | this.id = id; |
---|
| 63 | } |
---|
| 64 | |
---|
| 65 | |
---|
| 66 | |
---|
| 67 | |
---|
| 68 | |
---|
| 69 | /** |
---|
| 70 | * @param calendar the calendar to set |
---|
| 71 | */ |
---|
| 72 | public void setCalendar(List<AvailableBandwidth> calendar) { |
---|
| 73 | this.calendar = calendar; |
---|
| 74 | } |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | /** |
---|
| 81 | * @return the endpoint1 |
---|
| 82 | */ |
---|
| 83 | public Node getEndpoint1() { |
---|
| 84 | return endpoint1; |
---|
| 85 | } |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | /** |
---|
| 89 | * @param endpoint1 the endpoint1 to set |
---|
| 90 | */ |
---|
| 91 | public void setEndpoint1(Node endpoint1) { |
---|
| 92 | this.endpoint1 = endpoint1; |
---|
| 93 | } |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | /** |
---|
| 97 | * @return the endpoint2 |
---|
| 98 | */ |
---|
| 99 | public Node getEndpoint2() { |
---|
| 100 | return endpoint2; |
---|
| 101 | } |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | /** |
---|
| 105 | * @param endpoint2 the endpoint2 to set |
---|
| 106 | */ |
---|
| 107 | public void setEndpoint2(Node endpoint2) { |
---|
| 108 | this.endpoint2 = endpoint2; |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | |
---|
| 112 | /** |
---|
| 113 | * @return the calendar |
---|
| 114 | */ |
---|
| 115 | public List<AvailableBandwidth> getCalendar() { |
---|
| 116 | return calendar; |
---|
| 117 | } |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | } |
---|