blob: 33e5bdf7b91ed53d9579eaa953b41c8a08ab9bc6 [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 /**
Ayaka Koshibe38594c22014-10-22 13:36:12 -070023 * Notify that the switch has changed in some way.
24 * @param dpid the switch that changed
25 */
26 public void switchChanged(Dpid dpid);
27
28 /**
tom7ef8ff92014-09-17 13:08:06 -070029 * Notify that a port has changed.
30 * @param dpid the switch on which the change happened.
31 * @param status the new state of the port.
32 */
33 public void portChanged(Dpid dpid, OFPortStatus status);
Ayaka Koshibeab91cc42014-09-25 10:20:52 -070034
35 /**
36 * Notify that a role imposed on a switch failed to take hold.
37 *
38 * @param dpid the switch that failed role assertion
39 * @param role the role imposed by the controller
40 */
41 public void roleAssertFailed(Dpid dpid, RoleState role);
tom7ef8ff92014-09-17 13:08:06 -070042}