tom | 9c94c5b | 2014-09-17 13:14:42 -0700 | [diff] [blame] | 1 | package org.onlab.onos.openflow.controller; |
tom | 7ef8ff9 | 2014-09-17 13:08:06 -0700 | [diff] [blame] | 2 | |
| 3 | import org.projectfloodlight.openflow.protocol.OFPortStatus; |
| 4 | |
| 5 | /** |
| 6 | * Allows for providers interested in Switch events to be notified. |
| 7 | */ |
| 8 | public interface OpenFlowSwitchListener { |
| 9 | |
| 10 | /** |
| 11 | * Notify that the switch was added. |
| 12 | * @param dpid the switch where the event occurred |
| 13 | */ |
| 14 | public void switchAdded(Dpid dpid); |
| 15 | |
| 16 | /** |
| 17 | * Notify that the switch was removed. |
| 18 | * @param dpid the switch where the event occurred. |
| 19 | */ |
| 20 | public void switchRemoved(Dpid dpid); |
| 21 | |
| 22 | /** |
| 23 | * Notify that a port has changed. |
| 24 | * @param dpid the switch on which the change happened. |
| 25 | * @param status the new state of the port. |
| 26 | */ |
| 27 | public void portChanged(Dpid dpid, OFPortStatus status); |
Ayaka Koshibe | ab91cc4 | 2014-09-25 10:20:52 -0700 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * Notify that a role imposed on a switch failed to take hold. |
| 31 | * |
| 32 | * @param dpid the switch that failed role assertion |
| 33 | * @param role the role imposed by the controller |
| 34 | */ |
| 35 | public void roleAssertFailed(Dpid dpid, RoleState role); |
tom | 7ef8ff9 | 2014-09-17 13:08:06 -0700 | [diff] [blame] | 36 | } |