Jonathan Hart | 472062d | 2014-04-03 10:56:48 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.topology; |
Yuta HIGUCHI | a536e76 | 2014-02-17 21:47:28 -0800 | [diff] [blame] | 2 | |
Pavlin Radoslavov | 74986ce | 2014-02-20 13:17:20 -0800 | [diff] [blame] | 3 | import java.util.Collection; |
| 4 | |
Yuta HIGUCHI | a536e76 | 2014-02-17 21:47:28 -0800 | [diff] [blame] | 5 | /** |
| 6 | * Interface which needs to be implemented to receive Topology events from |
Jonathan Hart | e37e4e2 | 2014-05-13 19:12:02 -0700 | [diff] [blame] | 7 | * the Topology. |
Yuta HIGUCHI | a536e76 | 2014-02-17 21:47:28 -0800 | [diff] [blame] | 8 | */ |
Jonathan Hart | e37e4e2 | 2014-05-13 19:12:02 -0700 | [diff] [blame] | 9 | public interface ITopologyListener { |
Pavlin Radoslavov | 74986ce | 2014-02-20 13:17:20 -0800 | [diff] [blame] | 10 | /** |
Jonathan Hart | e37e4e2 | 2014-05-13 19:12:02 -0700 | [diff] [blame] | 11 | * Topology events. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 12 | * <p/> |
Pavlin Radoslavov | fdf34c7 | 2014-02-20 15:57:38 -0800 | [diff] [blame] | 13 | * The recommended ordering rules for applying/processing the events is: |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 14 | * (a) Process "added" events before "removed" events. |
| 15 | * (b) The ordering of the "added" events should be: |
| 16 | * addedSwitchEvents, addedPortEvents, addedLinkEvents, |
| 17 | * addedDeviceEvents |
| 18 | * The above ordering guarantees that adding a port for example |
| 19 | * will be processed after the corresponding switch itself is added. |
| 20 | * (c) The ordering of the "removed" events should be: |
| 21 | * removedDeviceEvents, removedLinkEvents, removedPortEvents, |
| 22 | * removedSwitchEvents |
| 23 | * The above ordering guarantees that removing a port for example |
| 24 | * will be processed before the corresponding switch itself is |
| 25 | * removed. |
Pavlin Radoslavov | fdf34c7 | 2014-02-20 15:57:38 -0800 | [diff] [blame] | 26 | * |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 27 | * @param addedSwitchEvents the Added Switch Events. |
Pavlin Radoslavov | 74986ce | 2014-02-20 13:17:20 -0800 | [diff] [blame] | 28 | * @param removedSwitchEvents the Removed Switch Events. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 29 | * @param addedPortEvents the Added Port Events. |
| 30 | * @param removedPortEvents the Removed Port Events. |
| 31 | * @param addedLinkEvents the Added Link Events. |
| 32 | * @param removedLinkEvents the Removed Link Events. |
| 33 | * @param addedDeviceEvents the Added Device Events. |
Pavlin Radoslavov | 74986ce | 2014-02-20 13:17:20 -0800 | [diff] [blame] | 34 | * @param removedDeviceEvents the Removed Device Events. |
| 35 | */ |
Ray Milkey | a5450cc | 2014-04-17 14:31:30 -0700 | [diff] [blame] | 36 | // CHECKSTYLE:OFF suppress warning about too many parameters |
Jonathan Hart | e37e4e2 | 2014-05-13 19:12:02 -0700 | [diff] [blame] | 37 | public void topologyEvents(Collection<SwitchEvent> addedSwitchEvents, |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 38 | Collection<SwitchEvent> removedSwitchEvents, |
| 39 | Collection<PortEvent> addedPortEvents, |
| 40 | Collection<PortEvent> removedPortEvents, |
| 41 | Collection<LinkEvent> addedLinkEvents, |
| 42 | Collection<LinkEvent> removedLinkEvents, |
| 43 | Collection<DeviceEvent> addedDeviceEvents, |
| 44 | Collection<DeviceEvent> removedDeviceEvents); |
Ray Milkey | a5450cc | 2014-04-17 14:31:30 -0700 | [diff] [blame] | 45 | // CHECKSTYLE:ON |
Yuta HIGUCHI | a536e76 | 2014-02-17 21:47:28 -0800 | [diff] [blame] | 46 | } |