Pavlin Radoslavov | 695f895 | 2014-07-23 16:57:01 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.registry; |
| 2 | |
| 3 | // TODO: The "Role" enums should be moved to this file |
| 4 | import net.floodlightcontroller.core.IFloodlightProviderService.Role; |
| 5 | import net.onrc.onos.core.util.Dpid; |
| 6 | |
| 7 | /** |
| 8 | * Switch mastership listener interface for controller role changes for |
| 9 | * local switches. |
| 10 | * <p/> |
| 11 | * The interface can be used to track only switches that are connected |
| 12 | * to this ONOS instance. |
| 13 | */ |
| 14 | public interface ILocalSwitchMastershipListener { |
| 15 | /** |
| 16 | * The role of this controller has changed for a switch. |
| 17 | * <p/> |
| 18 | * This is the method that is called when the switch connects to the |
| 19 | * controller, and when the role of the controller has changed. |
| 20 | * |
| 21 | * @param dpid the DPID of the switch. |
| 22 | * @param role the new role of this controller for the switch. |
| 23 | */ |
| 24 | void controllerRoleChanged(Dpid dpid, Role role); |
| 25 | |
| 26 | /** |
| 27 | * The switch has disconnected, and it is not tracked anymore. |
| 28 | * |
| 29 | * @param dpid the DPID of the switch. |
| 30 | */ |
| 31 | void switchDisconnected(Dpid dpid); |
| 32 | } |