Fix license header violations in openflowplugin-api
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / md / core / session / IMessageDispatchService.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.api.openflow.md.core.session;
10
11 import java.util.concurrent.Future;
12
13 import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterOutput;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierInput;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierOutput;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInput;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInput;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncOutput;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetConfigInput;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetConfigOutput;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesInput;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigInput;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigOutput;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GroupModInput;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MeterModInput;
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput;
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInput;
31 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortModInput;
32 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.RoleRequestInput;
33 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.RoleRequestOutput;
34 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.SetAsyncInput;
35 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.SetConfigInput;
36 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.TableModInput;
37 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.UpdatePortOutput;
38 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowOutput;
39 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.UpdateGroupOutput;
40 import org.opendaylight.yangtools.yang.common.RpcResult;
41
42 /**
43  * Message Dispatch Service to send the message to switch.
44  *
45  * @author AnilGujele
46  *
47  */
48 public interface IMessageDispatchService {
49
50     public static final String CONNECTION_ERROR_MESSAGE = "Session for the cookie is invalid. Reason: "
51     + "the switch has been recently disconnected OR inventory provides outdated information.";
52
53     /**
54      * send barrier 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<BarrierOutput>> barrier(BarrierInput input, SwitchConnectionDistinguisher cookie);
64
65     /**
66      * send experimenter 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<java.lang.Void>> experimenter(ExperimenterInput input, SwitchConnectionDistinguisher cookie);
76
77     /**
78      * send flow modification 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<UpdateFlowOutput>> flowMod(FlowModInput input, SwitchConnectionDistinguisher cookie);
88
89     /**
90      * send get async 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<GetAsyncOutput>> getAsync(GetAsyncInput input, SwitchConnectionDistinguisher cookie);
100
101     /**
102      * send get config 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<GetConfigOutput>> getConfig(GetConfigInput input, SwitchConnectionDistinguisher cookie);
112
113     /**
114      * send get features 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<GetFeaturesOutput>> getFeatures(GetFeaturesInput input, SwitchConnectionDistinguisher cookie);
124
125     /**
126      * send get queue config message to switch
127      *
128      * @param input
129      *            - message
130      * @param cookie
131      *            - to identify connection if null then feel free to send via
132      *            any connection
133      * @return - the future
134      */
135     Future<RpcResult<GetQueueConfigOutput>> getQueueConfig(GetQueueConfigInput input,
136             SwitchConnectionDistinguisher cookie);
137
138     /**
139      * send group 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<UpdateGroupOutput>> groupMod(GroupModInput input, SwitchConnectionDistinguisher cookie);
149
150     /**
151      * send meter modification message to switch
152      *
153      * @param input
154      *            - 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<UpdateMeterOutput>> meterMod(MeterModInput input, SwitchConnectionDistinguisher cookie);
161
162     /**
163      * send multipart request message to switch
164      *
165      * @param input
166      *            - multipart request 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>> multipartRequest(MultipartRequestInput input, SwitchConnectionDistinguisher cookie);
173
174     /**
175      * send packet out 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>> packetOut(PacketOutInput input, SwitchConnectionDistinguisher cookie);
185
186     /**
187      * send port modification 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<UpdatePortOutput>> portMod(PortModInput input, SwitchConnectionDistinguisher cookie);
197
198     /**
199      * send role request 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<RoleRequestOutput>> roleRequest(RoleRequestInput input, SwitchConnectionDistinguisher cookie);
209
210     /**
211      * send set async 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>> setAsync(SetAsyncInput input, SwitchConnectionDistinguisher cookie);
221
222     /**
223      * send set config 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>> setConfig(SetConfigInput input, SwitchConnectionDistinguisher cookie);
233
234     /**
235      * send table modification message to switch
236      *
237      * @param input
238      *            - message
239      * @param cookie
240      *            - to identify connection if null then feel free to send via
241      *            any connection
242      * @return - the future
243      */
244     Future<RpcResult<java.lang.Void>> tableMod(TableModInput input, SwitchConnectionDistinguisher cookie);
245
246 }