blob: 889db03235d01bd09eab07c7d1f46fd132ca0538 [file] [log] [blame]
Jonathan Hart472062d2014-04-03 10:56:48 -07001package net.onrc.onos.core.topology;
Yuta HIGUCHIa536e762014-02-17 21:47:28 -08002
Pavlin Radoslavov74986ce2014-02-20 13:17:20 -08003import java.util.Collection;
4
Yuta HIGUCHIa536e762014-02-17 21:47:28 -08005/**
6 * Interface which needs to be implemented to receive Topology events from
Jonathan Harte37e4e22014-05-13 19:12:02 -07007 * the Topology.
Yuta HIGUCHIa536e762014-02-17 21:47:28 -08008 */
Jonathan Harte37e4e22014-05-13 19:12:02 -07009public interface ITopologyListener {
Pavlin Radoslavov74986ce2014-02-20 13:17:20 -080010 /**
Jonathan Harte37e4e22014-05-13 19:12:02 -070011 * Topology events.
Ray Milkey269ffb92014-04-03 14:43:30 -070012 * <p/>
Pavlin Radoslavovfdf34c72014-02-20 15:57:38 -080013 * The recommended ordering rules for applying/processing the events is:
Ray Milkey269ffb92014-04-03 14:43:30 -070014 * (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 Radoslavovfdf34c72014-02-20 15:57:38 -080026 *
Ray Milkey269ffb92014-04-03 14:43:30 -070027 * @param addedSwitchEvents the Added Switch Events.
Pavlin Radoslavov74986ce2014-02-20 13:17:20 -080028 * @param removedSwitchEvents the Removed Switch Events.
Ray Milkey269ffb92014-04-03 14:43:30 -070029 * @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 Radoslavov74986ce2014-02-20 13:17:20 -080034 * @param removedDeviceEvents the Removed Device Events.
35 */
Ray Milkeya5450cc2014-04-17 14:31:30 -070036 // CHECKSTYLE:OFF suppress warning about too many parameters
Jonathan Harte37e4e22014-05-13 19:12:02 -070037 public void topologyEvents(Collection<SwitchEvent> addedSwitchEvents,
Ray Milkey269ffb92014-04-03 14:43:30 -070038 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 Milkeya5450cc2014-04-17 14:31:30 -070045 // CHECKSTYLE:ON
Yuta HIGUCHIa536e762014-02-17 21:47:28 -080046}