BUG-2794: Incorporated model Action api changes in OFJava to openflowplugin
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / IMDController.java
1 /**
2  * Copyright IBM Corporation, 2013.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.openflowplugin.openflow.md.core;
9
10 import java.util.List;
11
12 import org.opendaylight.openflowplugin.api.openflow.md.core.IMDMessageTranslator;
13 import org.opendaylight.openflowplugin.api.openflow.md.queue.PopListener;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
15 import org.opendaylight.yangtools.yang.binding.DataObject;
16
17 public interface IMDController {
18
19     /**
20      * Allows application to start translating OF messages received from switches.
21      *
22      * @param messageType
23      *            the type of OF message that applications want to receive
24      * @param version corresponding OF version
25      * @param translator
26      *            : Object that implements the {@link org.opendaylight.openflowplugin.api.openflow.md.core.IMDMessageTranslator}
27      */
28     public void addMessageTranslator(Class<? extends DataObject> messageType, int version, IMDMessageTranslator<OfHeader, List<DataObject>> translator);
29
30     /**
31      * Allows application to stop receiving OF message received from switches.
32      *
33      * @param messageType
34      *            The type of OF message that applications want to stop
35      *            receiving
36      * @param version TODO
37      * @param translator
38      *            The object that implements the {@link IMDMessageTranslator}
39      */
40     public void removeMessageTranslator(Class<? extends DataObject> messageType, int version, IMDMessageTranslator<OfHeader, List<DataObject>> translator);
41
42     /**
43      * Allows application to start pop-listening MD-SAL messages received from switches.
44      *
45      * @param messageType
46      *            the type of OF message that applications want to receive
47      * @param popListener
48      *            : Object that implements the {@link PopListener}
49      */
50     void removeMessagePopListener(Class<? extends DataObject> messageType, PopListener<DataObject> popListener);
51
52     /**
53      * Allows application to stop pop-listening MD-SAL messages received from switches.
54      *
55      * @param messageType
56      *            the type of OF message that applications want to receive
57      * @param popListener
58      *            : Object that implements the {@link PopListener}
59      */
60     void addMessagePopListener(Class<? extends DataObject> messageType, PopListener<DataObject> popListener);
61
62 }