blob: b1dce750a9c49df0aa819cdde7ed6927e2f27c81 [file] [log] [blame]
Jonathan Hart062a2e82014-02-03 09:41:57 -08001package net.onrc.onos.ofcontroller.networkgraph;
2
3import java.util.Collection;
4
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08005/**
6 * Interface of Switch Object exposed to the "NB" read-only Topology.
7 *
8 * Everything returned by these interfaces must be either Unmodifiable view,
9 * immutable object, or a copy of the original "SB" In-memory Topology.
10 *
11 */
Jonathan Hart062a2e82014-02-03 09:41:57 -080012public interface Switch {
Toshio Koide2f570c12014-02-06 16:55:32 -080013 public Long getDpid();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080014
Jonathan Hart062a2e82014-02-03 09:41:57 -080015 public Collection<Port> getPorts();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080016
Toshio Koide2f570c12014-02-06 16:55:32 -080017 public Port getPort(Long number);
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080018
19
Jonathan Hart062a2e82014-02-03 09:41:57 -080020 // Graph traversal API
21 public Iterable<Switch> getNeighbors();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080022
Toshio Koide2f570c12014-02-06 16:55:32 -080023 public Iterable<Link> getOutgoingLinks();
24 public Iterable<Link> getIncomingLinks();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080025
Toshio Koide2f570c12014-02-06 16:55:32 -080026 public Link getLinkToNeighbor(Long dpid);
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080027
Yuta HIGUCHIcb951982014-02-11 13:31:44 -080028 // XXX Iterable or Collection?
Jonathan Hart062a2e82014-02-03 09:41:57 -080029 public Collection<Device> getDevices();
30}