blob: 7552399d54b78671800c29c5d6629b2005efe096 [file] [log] [blame]
Jonathan Hart062a2e82014-02-03 09:41:57 -08001package net.onrc.onos.ofcontroller.networkgraph;
2
3import java.util.Collection;
4
5import net.onrc.onos.ofcontroller.util.FlowEntry;
6
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08007/**
8 * Interface of Switch Object exposed to the "NB" read-only Topology.
9 *
10 * Everything returned by these interfaces must be either Unmodifiable view,
11 * immutable object, or a copy of the original "SB" In-memory Topology.
12 *
13 */
Jonathan Hart062a2e82014-02-03 09:41:57 -080014public interface Switch {
15 public long getDpid();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080016
Jonathan Hart062a2e82014-02-03 09:41:57 -080017 public Collection<Port> getPorts();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080018
Jonathan Hart062a2e82014-02-03 09:41:57 -080019 public Port getPort(short number);
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080020
21
Jonathan Hart062a2e82014-02-03 09:41:57 -080022 // Flows
23 public Collection<FlowEntry> getFlowEntries();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080024
Jonathan Hart062a2e82014-02-03 09:41:57 -080025 // Graph traversal API
26 public Iterable<Switch> getNeighbors();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080027
Jonathan Hart062a2e82014-02-03 09:41:57 -080028 public Iterable<Link> getLinks();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080029
Jonathan Hart062a2e82014-02-03 09:41:57 -080030 public Link getLinkToNeighbor(long dpid);
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080031
Jonathan Hart062a2e82014-02-03 09:41:57 -080032 public Collection<Device> getDevices();
33}