Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.topology; |
| 2 | |
| 3 | import java.util.Collection; |
| 4 | |
| 5 | import net.floodlightcontroller.util.MACAddress; |
| 6 | import net.onrc.onos.core.util.Dpid; |
| 7 | import net.onrc.onos.core.util.LinkTuple; |
Yuta HIGUCHI | 45ccade | 2014-08-18 17:09:19 -0700 | [diff] [blame] | 8 | import net.onrc.onos.core.util.PortNumber; |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 9 | import net.onrc.onos.core.util.SwitchPort; |
| 10 | |
| 11 | /** |
| 12 | * Interface to reference internal self-contained elements. |
| 13 | */ |
Yuta HIGUCHI | ab9dc7b | 2014-08-26 22:53:13 -0700 | [diff] [blame] | 14 | public interface BaseInternalTopology extends BaseMastership { |
Yuta HIGUCHI | 9e6223d | 2014-08-26 00:01:32 -0700 | [diff] [blame] | 15 | |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 16 | /** |
| 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 Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 25 | * Gets all SwitchEvent entries. |
| 26 | * |
| 27 | * @return all SwitchEvent entries. |
| 28 | */ |
| 29 | public Collection<SwitchEvent> getAllSwitchEvents(); |
| 30 | |
| 31 | /** |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 32 | * 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 HIGUCHI | 45ccade | 2014-08-18 17:09:19 -0700 | [diff] [blame] | 40 | * 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 Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 57 | * Gets all PortEvent entries. |
| 58 | * |
| 59 | * @return all PortEvent entries. |
| 60 | */ |
| 61 | public Collection<PortEvent> getAllPortEvents(); |
| 62 | |
| 63 | /** |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 64 | * 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 HIGUCHI | 9e6223d | 2014-08-26 00:01:32 -0700 | [diff] [blame] | 81 | * 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 Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 97 | * Gets a collection of LinkEvent entries. |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 98 | * |
| 99 | * @param linkId Link identifier |
Pavlin Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 100 | * @return Collection of LinkEvent entries. |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 101 | */ |
| 102 | public Collection<LinkEvent> getLinkEvents(LinkTuple linkId); |
| 103 | |
| 104 | /** |
Pavlin Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 105 | * Gets all LinkEvent entries. |
| 106 | * |
| 107 | * @return all LinkEvent entries. |
| 108 | */ |
| 109 | public Collection<LinkEvent> getAllLinkEvents(); |
| 110 | |
| 111 | /** |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 112 | * 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 Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 119 | /** |
Yuta HIGUCHI | 9e6223d | 2014-08-26 00:01:32 -0700 | [diff] [blame] | 120 | * 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 Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 128 | * Gets all HostEvent entries. |
| 129 | * |
| 130 | * @return all HostEvent entries. |
| 131 | */ |
| 132 | public Collection<HostEvent> getAllHostEvents(); |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 133 | } |