X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow_netty%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Fcore%2FIController.java;fp=opendaylight%2Fprotocol_plugins%2Fopenflow_netty%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Fcore%2FIController.java;h=4920bb491bcf1633d9c35a93a688c94ca287875c;hb=85073423c6069e4b58fffde7cf19c806b2b52dd5;hp=0000000000000000000000000000000000000000;hpb=c5630f2945eb5370f9829514ef72de41d41eb2be;p=controller.git diff --git a/opendaylight/protocol_plugins/openflow_netty/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/IController.java b/opendaylight/protocol_plugins/openflow_netty/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/IController.java new file mode 100644 index 0000000000..4920bb491b --- /dev/null +++ b/opendaylight/protocol_plugins/openflow_netty/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/IController.java @@ -0,0 +1,66 @@ + +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.protocol_plugin.openflow.core; + +import java.net.InetAddress; +import java.util.Map; + +import org.openflow.protocol.OFType; + +/** + * This interface defines an abstraction of the Open Flow Controller that allows applications to control and manage the Open Flow switches. + * + */ +public interface IController { + + /** + * Allows application to start receiving OF messages received from switches. + * @param type the type of OF message that applications want to receive + * @param listener: Object that implements the IMessageListener + */ + public void addMessageListener(OFType type, IMessageListener listener); + + /** + * Allows application to stop receiving OF message received from switches. + * @param type The type of OF message that applications want to stop receiving + * @param listener The object that implements the IMessageListener + */ + public void removeMessageListener(OFType type, IMessageListener listener); + + /** + * Allows application to start receiving switch state change events. + * @param listener The object that implements the ISwitchStateListener + */ + public void addSwitchStateListener(ISwitchStateListener listener); + + /** + * Allows application to stop receiving switch state change events. + * @param listener The object that implements the ISwitchStateListener + */ + public void removeSwitchStateListener(ISwitchStateListener listener); + + /** + * Returns a map containing all the OF switches that are currently connected to the Controller. + * @return Map of ISwitch + */ + public Map getSwitches(); + + /** + * Returns the ISwitch of the given switchId. + * + * @param switchId The switch ID + * @return ISwitch if present, null otherwise + */ + public ISwitch getSwitch(Long switchId); + + public InetAddress getControllerIdForSwitch(Long id); + + +}