Merge "Fixed race condition in Activation."
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / session / IMessageDispatchService.java
1 package org.opendaylight.openflowplugin.openflow.md.core.session;
2
3 import java.util.concurrent.Future;
4
5 import org.opendaylight.openflowplugin.openflow.md.core.SwitchConnectionDistinguisher;
6 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterOutput;
7 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierInput;
8 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierOutput;
9 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput;
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInput;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInput;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncOutput;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetConfigInput;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetConfigOutput;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesInput;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigInput;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigOutput;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GroupModInput;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MeterModInput;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInput;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortModInput;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.RoleRequestInput;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.RoleRequestOutput;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.SetAsyncInput;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.SetConfigInput;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.TableModInput;
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowOutput;
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.UpdateGroupOutput;
31 import org.opendaylight.yangtools.yang.common.RpcResult;
32
33 /**
34  * Message Dispatch Service to send the message to switch.
35  *
36  * @author AnilGujele
37  *
38  */
39 public interface IMessageDispatchService {
40
41     /**
42      * send barrier message to switch
43      *
44      * @param input
45      *            - message
46      * @param cookie
47      *            - to identify connection if null then feel free to send via
48      *            any connection
49      * @return - the future
50      */
51     Future<RpcResult<BarrierOutput>> barrier(BarrierInput input, SwitchConnectionDistinguisher cookie);
52
53     /**
54      * send experimenter message to switch
55      *
56      * @param input
57      *            - message
58      * @param cookie
59      *            - to identify connection if null then feel free to send via
60      *            any connection
61      * @return - the future
62      */
63     Future<RpcResult<java.lang.Void>> experimenter(ExperimenterInput input, SwitchConnectionDistinguisher cookie);
64
65     /**
66      * send flow modification message to switch
67      *
68      * @param input
69      *            - message
70      * @param cookie
71      *            - to identify connection if null then feel free to send via
72      *            any connection
73      * @return - the future
74      */
75     Future<RpcResult<UpdateFlowOutput>> flowMod(FlowModInput input, SwitchConnectionDistinguisher cookie);
76
77     /**
78      * send get async message to switch
79      *
80      * @param input
81      *            - message
82      * @param cookie
83      *            - to identify connection if null then feel free to send via
84      *            any connection
85      * @return - the future
86      */
87     Future<RpcResult<GetAsyncOutput>> getAsync(GetAsyncInput input, SwitchConnectionDistinguisher cookie);
88
89     /**
90      * send get config message to switch
91      *
92      * @param input
93      *            - message
94      * @param cookie
95      *            - to identify connection if null then feel free to send via
96      *            any connection
97      * @return - the future
98      */
99     Future<RpcResult<GetConfigOutput>> getConfig(GetConfigInput input, SwitchConnectionDistinguisher cookie);
100
101     /**
102      * send get features message to switch
103      *
104      * @param input
105      *            - message
106      * @param cookie
107      *            - to identify connection if null then feel free to send via
108      *            any connection
109      * @return - the future
110      */
111     Future<RpcResult<GetFeaturesOutput>> getFeatures(GetFeaturesInput input, SwitchConnectionDistinguisher cookie);
112
113     /**
114      * send get queue config message to switch
115      *
116      * @param input
117      *            - message
118      * @param cookie
119      *            - to identify connection if null then feel free to send via
120      *            any connection
121      * @return - the future
122      */
123     Future<RpcResult<GetQueueConfigOutput>> getQueueConfig(GetQueueConfigInput input,
124             SwitchConnectionDistinguisher cookie);
125
126     /**
127      * send group modification message to switch
128      *
129      * @param input
130      *            - message
131      * @param cookie
132      *            - to identify connection if null then feel free to send via
133      *            any connection
134      * @return - the future
135      */
136     Future<RpcResult<UpdateGroupOutput>> groupMod(GroupModInput input, SwitchConnectionDistinguisher cookie);
137
138     /**
139      * send meter modification message to switch
140      *
141      * @param input
142      *            - message
143      * @param cookie
144      *            - to identify connection if null then feel free to send via
145      *            any connection
146      * @return - the future
147      */
148     Future<RpcResult<UpdateMeterOutput>> meterMod(MeterModInput input, SwitchConnectionDistinguisher cookie);
149
150     /**
151      * send multipart request message to switch
152      *
153      * @param input
154      *            - multipart request message
155      * @param cookie
156      *            - to identify connection if null then feel free to send via
157      *            any connection
158      * @return - the future
159      */
160     Future<RpcResult<java.lang.Void>> multipartRequest(MultipartRequestInput input, SwitchConnectionDistinguisher cookie);
161
162     /**
163      * send packet out message to switch
164      *
165      * @param input
166      *            - message
167      * @param cookie
168      *            - to identify connection if null then feel free to send via
169      *            any connection
170      * @return - the future
171      */
172     Future<RpcResult<java.lang.Void>> packetOut(PacketOutInput input, SwitchConnectionDistinguisher cookie);
173
174     /**
175      * send port modification message to switch
176      *
177      * @param input
178      *            - message
179      * @param cookie
180      *            - to identify connection if null then feel free to send via
181      *            any connection
182      * @return - the future
183      */
184     Future<RpcResult<java.lang.Void>> portMod(PortModInput input, SwitchConnectionDistinguisher cookie);
185
186     /**
187      * send role request message to switch
188      *
189      * @param input
190      *            - message
191      * @param cookie
192      *            - to identify connection if null then feel free to send via
193      *            any connection
194      * @return - the future
195      */
196     Future<RpcResult<RoleRequestOutput>> roleRequest(RoleRequestInput input, SwitchConnectionDistinguisher cookie);
197
198     /**
199      * send set async message to switch
200      *
201      * @param input
202      *            - message
203      * @param cookie
204      *            - to identify connection if null then feel free to send via
205      *            any connection
206      * @return - the future
207      */
208     Future<RpcResult<java.lang.Void>> setAsync(SetAsyncInput input, SwitchConnectionDistinguisher cookie);
209
210     /**
211      * send set config message to switch
212      *
213      * @param input
214      *            - message
215      * @param cookie
216      *            - to identify connection if null then feel free to send via
217      *            any connection
218      * @return - the future
219      */
220     Future<RpcResult<java.lang.Void>> setConfig(SetConfigInput input, SwitchConnectionDistinguisher cookie);
221
222     /**
223      * send table modification message to switch
224      *
225      * @param input
226      *            - message
227      * @param cookie
228      *            - to identify connection if null then feel free to send via
229      *            any connection
230      * @return - the future
231      */
232     Future<RpcResult<java.lang.Void>> tableMod(TableModInput input, SwitchConnectionDistinguisher cookie);
233
234 }