94f8bb5c860d4d4e2e2ef7b8d1fa6c8e421c5a6d
[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.List;
12 import java.util.Map;
13
14 import org.opendaylight.openflowplugin.openflow.md.core.ConnectionConductor;
15 import org.opendaylight.openflowplugin.openflow.md.core.IMDMessageTranslator;
16 import org.opendaylight.openflowplugin.openflow.md.core.TranslatorKey;
17
18 /**
19  * @author mirehak
20  * @param <IN> source type
21  * @param <OUT> result type
22  */
23 public interface QueueKeeper<IN, OUT> {
24     
25     public enum QueueType {DEFAULT, UNORDERED}
26
27     /**
28      * @param translatorMapping
29      */
30     void setTranslatorMapping(Map<TranslatorKey, Collection<IMDMessageTranslator<IN, List<OUT>>>> translatorMapping);
31
32     /**
33      * @param message
34      * @param conductor
35      */
36     void push(IN message, ConnectionConductor conductor);
37     
38     /**
39      * @param message
40      * @param conductor
41      * @param ordered - true if message order matters, false otherwise
42      */
43     void push(IN message, ConnectionConductor conductor, QueueType queueType);
44
45     /**
46      * @param popListenersMapping the popListenersMapping to set
47      */
48     void setPopListenersMapping(Map<Class<? extends OUT>, Collection<PopListener<OUT>>> popListenersMapping);
49 }