preparing QueueKeeper and message translation
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / queue / QueueKeeper.java
1 /**
2  * Copyright (c) 2013 Cisco Systems, Inc. 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 package org.opendaylight.openflowplugin.openflow.md.queue;
9
10 import java.util.Collection;
11 import java.util.Map;
12
13 import org.opendaylight.openflowplugin.openflow.md.core.ConnectionConductor;
14 import org.opendaylight.openflowplugin.openflow.md.core.IMDMessageTranslator;
15 import org.opendaylight.openflowplugin.openflow.md.core.TranslatorKey;
16
17 /**
18  * @author mirehak
19  * @param <IN> source type
20  * @param <OUT> result type
21  */
22 public interface QueueKeeper<IN, OUT> {
23     
24     /**
25      * @param listener
26      */
27     void addPopListener(PopListener<OUT> listener);
28     
29     /**
30      * @param listener
31      * @return removed listener
32      */
33     boolean removePopListener(PopListener<OUT> listener);
34     
35     /**
36      * @param translatorMapping
37      */
38     void setTranslatorMapping(Map<TranslatorKey, Collection<IMDMessageTranslator<IN, OUT>>> translatorMapping);
39
40     /**
41      * @param registeredMessageClazz registered message type
42      * @param message 
43      * @param conductor 
44      */
45     void push(Class<? extends IN> registeredMessageClazz, IN message, 
46             ConnectionConductor conductor);
47 }