blob: 26b621222285b8325633fe6859dd2f58a5e3bc3f [file] [log] [blame]
Jonathan Harte37e4e22014-05-13 19:12:02 -07001package net.onrc.onos.core.topology;
2
3import net.floodlightcontroller.core.module.IFloodlightService;
4
5/**
6 * Interface for providing the topology service to other modules.
7 */
8public interface ITopologyService extends IFloodlightService {
9 /**
10 * Allows a module to get a reference to the global topology object.
11 *
12 * @return the global Topology object
13 */
Yuta HIGUCHId92b10c2014-08-25 09:30:28 -070014 public MutableTopology getTopology();
Jonathan Harte37e4e22014-05-13 19:12:02 -070015
16 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070017 * Adds a listener for topology events.
Jonathan Harte37e4e22014-05-13 19:12:02 -070018 *
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070019 * @param listener the listener to add.
20 * @param startFromSnapshot if true, and if the topology is not
21 * empty, the first event should be a snapshot of the current topology.
Jonathan Harte37e4e22014-05-13 19:12:02 -070022 */
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070023 public void addListener(ITopologyListener listener,
24 boolean startFromSnapshot);
Jonathan Harte37e4e22014-05-13 19:12:02 -070025
26 /**
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070027 * Removes a listener for topology events. The listener will no longer
Jonathan Harte37e4e22014-05-13 19:12:02 -070028 * receive topology events after this call.
29 *
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070030 * @param listener the listener to remove.
Jonathan Harte37e4e22014-05-13 19:12:02 -070031 */
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070032 public void removeListener(ITopologyListener listener);
Jonathan Harte37e4e22014-05-13 19:12:02 -070033}