blob: 690cea8f3f6c490865dea6ea69c4d231eae0ee09 [file] [log] [blame]
package net.onrc.onos.core.topology;
import java.util.Collection;
/**
* Interface of Switch Object exposed to the "NB" read-only Topology.
* <p/>
* Everything returned by these interfaces must be either Unmodifiable view,
* immutable object, or a copy of the original "SB" In-memory Topology.
*/
public interface Switch {
public Long getDpid();
public Collection<Port> getPorts();
public Port getPort(Long number);
// Graph traversal API
// XXX What is the Definition of neighbor? Link exist in both direction or one-way is sufficient to be a neighbor, etc.
public Iterable<Switch> getNeighbors();
public Iterable<Link> getOutgoingLinks();
public Iterable<Link> getIncomingLinks();
public Link getLinkToNeighbor(Long dpid);
// XXX Iterable or Collection?
public Collection<Device> getDevices();
}