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 | */ |
| 14 | public interface TopologyInternal extends Topology { |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 15 | /** |
| 16 | * Gets a SwitchEvent. |
| 17 | * |
| 18 | * @param dpid Switch DPID |
| 19 | * @return the SwitchEvent for the Switch DPID if found, otherwise null |
| 20 | */ |
| 21 | public SwitchEvent getSwitchEvent(Dpid dpid); |
| 22 | |
| 23 | /** |
Pavlin Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 24 | * Gets all SwitchEvent entries. |
| 25 | * |
| 26 | * @return all SwitchEvent entries. |
| 27 | */ |
| 28 | public Collection<SwitchEvent> getAllSwitchEvents(); |
| 29 | |
| 30 | /** |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 31 | * Gets a PortEvent. |
| 32 | * |
| 33 | * @param port Port identifier |
| 34 | * @return the PortEvent for the Port identifier if found, otherwise null |
| 35 | */ |
| 36 | public PortEvent getPortEvent(SwitchPort port); |
| 37 | |
| 38 | /** |
Yuta HIGUCHI | 45ccade | 2014-08-18 17:09:19 -0700 | [diff] [blame^] | 39 | * Gets a PortEvent. |
| 40 | * |
| 41 | * @param dpid Switch DPID |
| 42 | * @param portNumber Port number |
| 43 | * @return the PortEvent for the (Dpid, PortNumber) if found, otherwise null |
| 44 | */ |
| 45 | public PortEvent getPortEvent(Dpid dpid, PortNumber portNumber); |
| 46 | |
| 47 | /** |
| 48 | * Gets all the PortEvents on a switch. |
| 49 | * |
| 50 | * @param dpid Switch DPID |
| 51 | * @return PortEvents |
| 52 | */ |
| 53 | public Collection<PortEvent> getPortEvents(Dpid dpid); |
| 54 | |
| 55 | /** |
Pavlin Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 56 | * Gets all PortEvent entries. |
| 57 | * |
| 58 | * @return all PortEvent entries. |
| 59 | */ |
| 60 | public Collection<PortEvent> getAllPortEvents(); |
| 61 | |
| 62 | /** |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 63 | * Gets a LinkEvent. |
| 64 | * |
| 65 | * @param linkId Link identifier |
| 66 | * @return the LinkEvent for the Link identifier if found, otherwise null |
| 67 | */ |
| 68 | public LinkEvent getLinkEvent(LinkTuple linkId); |
| 69 | |
| 70 | /** |
| 71 | * Gets a LinkEvent. |
| 72 | * |
| 73 | * @param linkId Link identifier |
| 74 | * @param type type |
| 75 | * @return the LinkEvent for the Link identifier and type if found, otherwise null |
| 76 | */ |
| 77 | public LinkEvent getLinkEvent(final LinkTuple linkId, final String type); |
| 78 | |
| 79 | /** |
Pavlin Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 80 | * Gets a collection of LinkEvent entries. |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 81 | * |
| 82 | * @param linkId Link identifier |
Pavlin Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 83 | * @return Collection of LinkEvent entries. |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 84 | */ |
| 85 | public Collection<LinkEvent> getLinkEvents(LinkTuple linkId); |
| 86 | |
| 87 | /** |
Pavlin Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 88 | * Gets all LinkEvent entries. |
| 89 | * |
| 90 | * @return all LinkEvent entries. |
| 91 | */ |
| 92 | public Collection<LinkEvent> getAllLinkEvents(); |
| 93 | |
| 94 | /** |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 95 | * Gets a HostEvent. |
| 96 | * |
| 97 | * @param mac MACAddress of the host |
| 98 | * @return the HostEvent for the MACAddress if found, otherwise null |
| 99 | */ |
| 100 | public HostEvent getHostEvent(MACAddress mac); |
| 101 | |
Pavlin Radoslavov | 054cd59 | 2014-08-07 20:57:16 -0700 | [diff] [blame] | 102 | /** |
| 103 | * Gets all HostEvent entries. |
| 104 | * |
| 105 | * @return all HostEvent entries. |
| 106 | */ |
| 107 | public Collection<HostEvent> getAllHostEvents(); |
Yuta HIGUCHI | 8b389a7 | 2014-07-18 13:50:00 -0700 | [diff] [blame] | 108 | } |