blob: 8715b126db8b06011374b2b2bab0b2753f1599cf [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 HIGUCHIce4a06b2014-04-25 19:37:57 -07003// TODO Everything returned by these interfaces must be either Unmodifiable view,
4// immutable object, or a copy of the original "SB" In-memory Topology.
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08005/**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -07006 * Interface of Link object in Network Graph topology.
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08007 */
Jonathan Hart062a2e82014-02-03 09:41:57 -08008public interface Link {
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -08009 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070010 * Gets the source switch for the link.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080011 *
12 * @return the source switch for the link.
13 */
14 public Switch getSrcSwitch();
Toshio Koide0c9106d2014-02-19 15:26:38 -080015
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080016 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070017 * Gets the source port for the link.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080018 *
19 * @return the source port for the link.
20 */
21 public Port getSrcPort();
Toshio Koide2f570c12014-02-06 16:55:32 -080022
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080023 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070024 * Gets the destination switch for the link.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080025 *
26 * @return the destination switch for the link.
27 */
28 public Switch getDstSwitch();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080029
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080030 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070031 * Gets the destination port for the link.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080032 *
33 * @return the destination port for the link.
34 */
35 public Port getDstPort();
36
37 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070038 * Gets the last seen time for the link.
Ray Milkey269ffb92014-04-03 14:43:30 -070039 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080040 * TODO: Not implemented yet.
41 * TODO: what is the time definition?
42 *
43 * @return the last seen time for the link.
44 */
45 public long getLastSeenTime();
46
47 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070048 * Gets the link cost.
Ray Milkey269ffb92014-04-03 14:43:30 -070049 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080050 * TODO: What is the unit?
51 *
52 * @param return the link cost.
53 */
54 public int getCost();
55
56 /**
Yuta HIGUCHIce4a06b2014-04-25 19:37:57 -070057 * Gets the link capacity.
Ray Milkey269ffb92014-04-03 14:43:30 -070058 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080059 * TODO: What is the unit?
60 *
61 * @return the link capacity.
62 */
63 public Double getCapacity();
Jonathan Hart062a2e82014-02-03 09:41:57 -080064}