2 * Copyright 2014 Open Networking Laboratory
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onosproject.openflow.controller;
18 import org.projectfloodlight.openflow.protocol.OFMessage;
21 * Test adapter for the OpenFlow controller interface.
23 public class OpenflowControllerAdapter implements OpenFlowController {
25 public Iterable<OpenFlowSwitch> getSwitches() {
30 public Iterable<OpenFlowSwitch> getMasterSwitches() {
35 public Iterable<OpenFlowSwitch> getEqualSwitches() {
40 public OpenFlowSwitch getSwitch(Dpid dpid) {
45 public OpenFlowSwitch getMasterSwitch(Dpid dpid) {
50 public OpenFlowSwitch getEqualSwitch(Dpid dpid) {
55 public void addListener(OpenFlowSwitchListener listener) {
59 public void removeListener(OpenFlowSwitchListener listener) {
63 public void addPacketListener(int priority, PacketListener listener) {
67 public void removePacketListener(PacketListener listener) {
71 public void write(Dpid dpid, OFMessage msg) {
75 public void processPacket(Dpid dpid, OFMessage msg) {
79 public void setRole(Dpid dpid, RoleState role) {
83 public void addEventListener(OpenFlowEventListener listener) {
87 public void removeEventListener(OpenFlowEventListener listener) {