blob: 292e26013cce33704796e88a387332dd605f1758 [file] [log] [blame]
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -07001package net.onrc.onos.core.topology;
2
3import java.util.Collection;
4
5import net.floodlightcontroller.util.MACAddress;
6import net.onrc.onos.core.util.Dpid;
7import net.onrc.onos.core.util.LinkTuple;
Yuta HIGUCHI45ccade2014-08-18 17:09:19 -07008import net.onrc.onos.core.util.PortNumber;
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -07009import net.onrc.onos.core.util.SwitchPort;
10
Yuta HIGUCHId92b10c2014-08-25 09:30:28 -070011// FIXME This Class hierarchy is wrong.
12// - We need BaseTopology + access to self-contained *Event objects.
13// abstract class implementing BaseTopology?
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070014/**
15 * Interface to reference internal self-contained elements.
16 */
Yuta HIGUCHId92b10c2014-08-25 09:30:28 -070017public interface TopologyInternal extends MutableTopology {
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070018 /**
19 * Gets a SwitchEvent.
20 *
21 * @param dpid Switch DPID
22 * @return the SwitchEvent for the Switch DPID if found, otherwise null
23 */
24 public SwitchEvent getSwitchEvent(Dpid dpid);
25
26 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070027 * Gets all SwitchEvent entries.
28 *
29 * @return all SwitchEvent entries.
30 */
31 public Collection<SwitchEvent> getAllSwitchEvents();
32
33 /**
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070034 * Gets a PortEvent.
35 *
36 * @param port Port identifier
37 * @return the PortEvent for the Port identifier if found, otherwise null
38 */
39 public PortEvent getPortEvent(SwitchPort port);
40
41 /**
Yuta HIGUCHI45ccade2014-08-18 17:09:19 -070042 * Gets a PortEvent.
43 *
44 * @param dpid Switch DPID
45 * @param portNumber Port number
46 * @return the PortEvent for the (Dpid, PortNumber) if found, otherwise null
47 */
48 public PortEvent getPortEvent(Dpid dpid, PortNumber portNumber);
49
50 /**
51 * Gets all the PortEvents on a switch.
52 *
53 * @param dpid Switch DPID
54 * @return PortEvents
55 */
56 public Collection<PortEvent> getPortEvents(Dpid dpid);
57
58 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070059 * Gets all PortEvent entries.
60 *
61 * @return all PortEvent entries.
62 */
63 public Collection<PortEvent> getAllPortEvents();
64
65 /**
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070066 * Gets a LinkEvent.
67 *
68 * @param linkId Link identifier
69 * @return the LinkEvent for the Link identifier if found, otherwise null
70 */
71 public LinkEvent getLinkEvent(LinkTuple linkId);
72
73 /**
74 * Gets a LinkEvent.
75 *
76 * @param linkId Link identifier
77 * @param type type
78 * @return the LinkEvent for the Link identifier and type if found, otherwise null
79 */
80 public LinkEvent getLinkEvent(final LinkTuple linkId, final String type);
81
82 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070083 * Gets a collection of LinkEvent entries.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070084 *
85 * @param linkId Link identifier
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070086 * @return Collection of LinkEvent entries.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070087 */
88 public Collection<LinkEvent> getLinkEvents(LinkTuple linkId);
89
90 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070091 * Gets all LinkEvent entries.
92 *
93 * @return all LinkEvent entries.
94 */
95 public Collection<LinkEvent> getAllLinkEvents();
96
97 /**
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070098 * Gets a HostEvent.
99 *
100 * @param mac MACAddress of the host
101 * @return the HostEvent for the MACAddress if found, otherwise null
102 */
103 public HostEvent getHostEvent(MACAddress mac);
104
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700105 /**
106 * Gets all HostEvent entries.
107 *
108 * @return all HostEvent entries.
109 */
110 public Collection<HostEvent> getAllHostEvents();
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -0700111}