Eliminate the use of CompositeObjectRegistration
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / IMDController.java
1 /*
2  * Copyright (c) 2013, 2015 IBM Corporation and others.  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
9 package org.opendaylight.openflowplugin.openflow.md.core;
10
11 import java.util.List;
12
13 import org.opendaylight.openflowplugin.api.openflow.md.core.IMDMessageTranslator;
14 import org.opendaylight.openflowplugin.api.openflow.md.queue.PopListener;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
16 import org.opendaylight.yangtools.yang.binding.DataObject;
17
18 public interface IMDController {
19
20     /**
21      * Allows application to start translating OF messages received from switches.
22      *
23      * @param messageType
24      *            the type of OF message that applications want to receive
25      * @param version corresponding OF version
26      * @param translator
27      *            : Object that implements the {@link org.opendaylight.openflowplugin.api.openflow.md.core.IMDMessageTranslator}
28      */
29     public void addMessageTranslator(Class<? extends DataObject> messageType, int version, IMDMessageTranslator<OfHeader, List<DataObject>> translator);
30
31     /**
32      * Allows application to stop receiving OF message received from switches.
33      *
34      * @param messageType
35      *            The type of OF message that applications want to stop
36      *            receiving
37      * @param version TODO
38      * @param translator
39      *            The object that implements the {@link IMDMessageTranslator}
40      */
41     public void removeMessageTranslator(Class<? extends DataObject> messageType, int version, IMDMessageTranslator<OfHeader, List<DataObject>> translator);
42
43     /**
44      * Allows application to start pop-listening MD-SAL messages received from switches.
45      *
46      * @param messageType
47      *            the type of OF message that applications want to receive
48      * @param popListener
49      *            : Object that implements the {@link PopListener}
50      */
51     void removeMessagePopListener(Class<? extends DataObject> messageType, PopListener<DataObject> popListener);
52
53     /**
54      * Allows application to stop pop-listening MD-SAL messages received from switches.
55      *
56      * @param messageType
57      *            the type of OF message that applications want to receive
58      * @param popListener
59      *            : Object that implements the {@link PopListener}
60      */
61     void addMessagePopListener(Class<? extends DataObject> messageType, PopListener<DataObject> popListener);
62
63 }