blob: 6f9d9bfe42cffce5428786aa1eab1f6d224f71a0 [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
11/**
12 * Interface to reference internal self-contained elements.
13 */
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -070014public interface BaseInternalTopology {
15
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070016 /**
17 * Gets a SwitchEvent.
18 *
19 * @param dpid Switch DPID
20 * @return the SwitchEvent for the Switch DPID if found, otherwise null
21 */
22 public SwitchEvent getSwitchEvent(Dpid dpid);
23
24 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070025 * Gets all SwitchEvent entries.
26 *
27 * @return all SwitchEvent entries.
28 */
29 public Collection<SwitchEvent> getAllSwitchEvents();
30
31 /**
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070032 * Gets a PortEvent.
33 *
34 * @param port Port identifier
35 * @return the PortEvent for the Port identifier if found, otherwise null
36 */
37 public PortEvent getPortEvent(SwitchPort port);
38
39 /**
Yuta HIGUCHI45ccade2014-08-18 17:09:19 -070040 * Gets a PortEvent.
41 *
42 * @param dpid Switch DPID
43 * @param portNumber Port number
44 * @return the PortEvent for the (Dpid, PortNumber) if found, otherwise null
45 */
46 public PortEvent getPortEvent(Dpid dpid, PortNumber portNumber);
47
48 /**
49 * Gets all the PortEvents on a switch.
50 *
51 * @param dpid Switch DPID
52 * @return PortEvents
53 */
54 public Collection<PortEvent> getPortEvents(Dpid dpid);
55
56 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070057 * Gets all PortEvent entries.
58 *
59 * @return all PortEvent entries.
60 */
61 public Collection<PortEvent> getAllPortEvents();
62
63 /**
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070064 * Gets a LinkEvent.
65 *
66 * @param linkId Link identifier
67 * @return the LinkEvent for the Link identifier if found, otherwise null
68 */
69 public LinkEvent getLinkEvent(LinkTuple linkId);
70
71 /**
72 * Gets a LinkEvent.
73 *
74 * @param linkId Link identifier
75 * @param type type
76 * @return the LinkEvent for the Link identifier and type if found, otherwise null
77 */
78 public LinkEvent getLinkEvent(final LinkTuple linkId, final String type);
79
80 /**
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -070081 * Gets all the LinkEvent departing from specified port.
82 *
83 * @param srcPort source port identifier
84 * @return Collection of LinkEvent entries
85 */
86 public Collection<LinkEvent> getLinkEventsFrom(final SwitchPort srcPort);
87
88 /**
89 * Gets all the LinkEvent pointing toward specified port.
90 *
91 * @param dstPort destination port identifier
92 * @return Collection of LinkEvent entries
93 */
94 public Collection<LinkEvent> getLinkEventsTo(final SwitchPort dstPort);
95
96 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070097 * Gets a collection of LinkEvent entries.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070098 *
99 * @param linkId Link identifier
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700100 * @return Collection of LinkEvent entries.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -0700101 */
102 public Collection<LinkEvent> getLinkEvents(LinkTuple linkId);
103
104 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700105 * Gets all LinkEvent entries.
106 *
107 * @return all LinkEvent entries.
108 */
109 public Collection<LinkEvent> getAllLinkEvents();
110
111 /**
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -0700112 * Gets a HostEvent.
113 *
114 * @param mac MACAddress of the host
115 * @return the HostEvent for the MACAddress if found, otherwise null
116 */
117 public HostEvent getHostEvent(MACAddress mac);
118
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700119 /**
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -0700120 * Gets all HostEvent entries attached to specified port.
121 *
122 * @param port attachment point identifier
123 * @return Collection of HostEvent entries.
124 */
125 public Collection<HostEvent> getHostEvents(SwitchPort port);
126
127 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700128 * Gets all HostEvent entries.
129 *
130 * @return all HostEvent entries.
131 */
132 public Collection<HostEvent> getAllHostEvents();
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -0700133}