blob: 8cd7b823ee84d64cc1ac585ef5b0774f81da874c [file] [log] [blame]
Jonathan Hart472062d2014-04-03 10:56:48 -07001package net.onrc.onos.core.topology;
Jonathan Hart062a2e82014-02-03 09:41:57 -08002
Yuta HIGUCHIa7f1cdd2014-06-09 15:05:20 -07003import net.onrc.onos.core.topology.web.serializers.LinkSerializer;
4
Pavlin Radoslavov1cbfcae2014-05-23 17:28:08 -07005import org.codehaus.jackson.map.annotate.JsonSerialize;
6
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -07007// TODO Everything returned by these interfaces must be either Unmodifiable view,
8// immutable object, or a copy of the original "SB" In-memory Topology.
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08009/**
Jonathan Harte37e4e22014-05-13 19:12:02 -070010 * Interface of Link object in the topology.
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080011 */
Pavlin Radoslavov1cbfcae2014-05-23 17:28:08 -070012@JsonSerialize(using = LinkSerializer.class)
Yuta HIGUCHIdb1b8302014-06-26 10:50:39 -070013public interface Link extends StringAttributes {
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080014 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070015 * Gets the source switch for the link.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080016 *
17 * @return the source switch for the link.
18 */
19 public Switch getSrcSwitch();
Toshio Koide0c9106d2014-02-19 15:26:38 -080020
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080021 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070022 * Gets the source port for the link.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080023 *
24 * @return the source port for the link.
25 */
26 public Port getSrcPort();
Toshio Koide2f570c12014-02-06 16:55:32 -080027
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080028 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070029 * Gets the destination switch for the link.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080030 *
31 * @return the destination switch for the link.
32 */
33 public Switch getDstSwitch();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080034
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080035 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070036 * Gets the destination port for the link.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080037 *
38 * @return the destination port for the link.
39 */
40 public Port getDstPort();
41
42 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070043 * Gets the last seen time for the link.
Ray Milkey269ffb92014-04-03 14:43:30 -070044 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080045 * TODO: Not implemented yet.
46 * TODO: what is the time definition?
47 *
48 * @return the last seen time for the link.
49 */
50 public long getLastSeenTime();
51
52 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070053 * Gets the link capacity.
Ray Milkey269ffb92014-04-03 14:43:30 -070054 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080055 * TODO: What is the unit?
56 *
57 * @return the link capacity.
58 */
59 public Double getCapacity();
Jonathan Hart062a2e82014-02-03 09:41:57 -080060}