blob: 3bf79881bd72f0e73cbfabdc92e69c59faff5476 [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001/**
Ray Milkey269ffb92014-04-03 14:43:30 -07002 * Copyright 2011, Big Switch Networks, Inc.
3 * Originally created by David Erickson, Stanford University
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may
6 * not use this file except in compliance with the License. You may obtain
7 * a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations
15 * under the License.
16 **/
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080017
18package net.floodlightcontroller.core;
19
Brian O'Connorc67f9fa2014-08-07 18:17:46 -070020import org.projectfloodlight.openflow.protocol.OFMessage;
21import org.projectfloodlight.openflow.protocol.OFType;
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080022
23/**
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080024 * @author David Erickson (daviderickson@cs.stanford.edu)
25 */
26public interface IOFMessageListener extends IListener<OFType> {
Ray Milkey269ffb92014-04-03 14:43:30 -070027 /**
28 * This is the method Floodlight uses to call listeners with OpenFlow messages
29 *
30 * @param sw the OpenFlow switch that sent this message
31 * @param msg the message
32 * @param cntx a Floodlight message context object you can use to pass
33 * information between listeners
34 * @return the command to continue or stop the execution
35 */
36 public Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx);
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080037}