Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.openflow.controller; |
tom | 7ef8ff9 | 2014-09-17 13:08:06 -0700 | [diff] [blame] | 17 | |
| 18 | import org.projectfloodlight.openflow.protocol.OFPortStatus; |
| 19 | |
| 20 | /** |
| 21 | * Allows for providers interested in Switch events to be notified. |
| 22 | */ |
| 23 | public interface OpenFlowSwitchListener { |
| 24 | |
| 25 | /** |
| 26 | * Notify that the switch was added. |
| 27 | * @param dpid the switch where the event occurred |
| 28 | */ |
Sho SHIMIZU | 358815c | 2015-05-13 11:25:32 -0700 | [diff] [blame] | 29 | void switchAdded(Dpid dpid); |
tom | 7ef8ff9 | 2014-09-17 13:08:06 -0700 | [diff] [blame] | 30 | |
| 31 | /** |
| 32 | * Notify that the switch was removed. |
| 33 | * @param dpid the switch where the event occurred. |
| 34 | */ |
Sho SHIMIZU | 358815c | 2015-05-13 11:25:32 -0700 | [diff] [blame] | 35 | void switchRemoved(Dpid dpid); |
tom | 7ef8ff9 | 2014-09-17 13:08:06 -0700 | [diff] [blame] | 36 | |
| 37 | /** |
Ayaka Koshibe | 38594c2 | 2014-10-22 13:36:12 -0700 | [diff] [blame] | 38 | * Notify that the switch has changed in some way. |
| 39 | * @param dpid the switch that changed |
| 40 | */ |
Sho SHIMIZU | 358815c | 2015-05-13 11:25:32 -0700 | [diff] [blame] | 41 | void switchChanged(Dpid dpid); |
Ayaka Koshibe | 38594c2 | 2014-10-22 13:36:12 -0700 | [diff] [blame] | 42 | |
| 43 | /** |
tom | 7ef8ff9 | 2014-09-17 13:08:06 -0700 | [diff] [blame] | 44 | * Notify that a port has changed. |
| 45 | * @param dpid the switch on which the change happened. |
| 46 | * @param status the new state of the port. |
| 47 | */ |
Sho SHIMIZU | 358815c | 2015-05-13 11:25:32 -0700 | [diff] [blame] | 48 | void portChanged(Dpid dpid, OFPortStatus status); |
Ayaka Koshibe | ab91cc4 | 2014-09-25 10:20:52 -0700 | [diff] [blame] | 49 | |
| 50 | /** |
| 51 | * Notify that a role imposed on a switch failed to take hold. |
| 52 | * |
| 53 | * @param dpid the switch that failed role assertion |
Yuta HIGUCHI | 5c94727 | 2014-11-03 21:39:21 -0800 | [diff] [blame] | 54 | * @param requested the role controller requested |
| 55 | * @param response role reply from the switch |
Ayaka Koshibe | ab91cc4 | 2014-09-25 10:20:52 -0700 | [diff] [blame] | 56 | */ |
Sho SHIMIZU | 358815c | 2015-05-13 11:25:32 -0700 | [diff] [blame] | 57 | void receivedRoleReply(Dpid dpid, RoleState requested, RoleState response); |
tom | 7ef8ff9 | 2014-09-17 13:08:06 -0700 | [diff] [blame] | 58 | } |