blob: 717d24149c79bbe26b3a5bf743cc7a04600157a4 [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
Jonathan Hart062a2e82014-02-03 09:41:57 -080028 public Collection<Device> getDevices();
29}