blob: 53217da84c73bc3a4b98151c4fcbbdc844a598fa [file] [log] [blame]
tom9c94c5b2014-09-17 13:14:42 -07001package org.onlab.onos.openflow.controller;
tom7ef8ff92014-09-17 13:08:06 -07002
3import org.projectfloodlight.openflow.protocol.OFPortStatus;
4
5/**
6 * Allows for providers interested in Switch events to be notified.
7 */
8public 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 Koshibeab91cc42014-09-25 10:20:52 -070028
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);
tom7ef8ff92014-09-17 13:08:06 -070036}