2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.openflowplugin.openflow.md.core.sal;
10 import java.util.concurrent.Future;
11 import java.util.concurrent.TimeUnit;
13 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
14 import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher;
15 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.PacketOutConvertor;
16 import org.opendaylight.openflowplugin.api.openflow.md.core.session.IMessageDispatchService;
17 import org.opendaylight.openflowplugin.openflow.md.core.session.OFSessionUtil;
18 import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
19 import org.opendaylight.openflowplugin.openflow.md.core.session.SwitchConnectionCookieOFImpl;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowOutput;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowInput;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowOutput;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowInput;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowOutput;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput;
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput;
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableInput;
31 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableOutput;
32 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowsStatisticsFromAllFlowTablesInput;
33 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowsStatisticsFromAllFlowTablesOutput;
34 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetFlowStatisticsFromFlowTableInput;
35 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetFlowStatisticsFromFlowTableOutput;
36 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.GetFlowTablesStatisticsInput;
37 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.GetFlowTablesStatisticsOutput;
38 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupInput;
39 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupOutput;
40 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupInput;
41 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupOutput;
42 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.UpdateGroupInput;
43 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.UpdateGroupOutput;
44 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsInput;
45 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsOutput;
46 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupDescriptionInput;
47 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupDescriptionOutput;
48 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupFeaturesInput;
49 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupFeaturesOutput;
50 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupStatisticsInput;
51 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupStatisticsOutput;
52 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
53 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
54 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.AddMeterInput;
55 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.AddMeterOutput;
56 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.RemoveMeterInput;
57 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.RemoveMeterOutput;
58 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterInput;
59 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterOutput;
60 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsInput;
61 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsOutput;
62 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterStatisticsInput;
63 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterStatisticsOutput;
64 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterFeaturesInput;
65 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterFeaturesOutput;
66 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsInput;
67 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsOutput;
68 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInput;
69 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.ConnectionCookie;
70 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInput;
71 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.UpdatePortInput;
72 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.UpdatePortOutput;
73 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetAllNodeConnectorsStatisticsInput;
74 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetAllNodeConnectorsStatisticsOutput;
75 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetNodeConnectorStatisticsInput;
76 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetNodeConnectorStatisticsOutput;
77 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsInput;
78 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsOutput;
79 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromGivenPortInput;
80 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromGivenPortOutput;
81 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetQueueStatisticsFromGivenPortInput;
82 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetQueueStatisticsFromGivenPortOutput;
83 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.UpdateTableInput;
84 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.UpdateTableOutput;
85 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
86 import org.opendaylight.yangtools.yang.common.RpcResult;
87 import org.slf4j.Logger;
89 import com.google.common.util.concurrent.Futures;
90 import com.google.common.util.concurrent.ListenableFuture;
93 * RPC implementation of MD-switch
95 public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
97 private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(ModelDrivenSwitchImpl.class);
98 private final NodeId nodeId;
99 private final IMessageDispatchService messageService;
100 private short version = 0;
101 private NotificationProviderService rpcNotificationProviderService;
102 private OFRpcTaskContext rpcTaskContext;
104 // TODO:read timeout from configSubsystem
105 protected long maxTimeout = 1000;
106 protected TimeUnit maxTimeoutUnit = TimeUnit.MILLISECONDS;
108 protected ModelDrivenSwitchImpl(final NodeId nodeId, final InstanceIdentifier<Node> identifier,
109 final SessionContext sessionContext) {
110 super(identifier, sessionContext);
111 this.nodeId = nodeId;
112 messageService = sessionContext.getMessageDispatchService();
113 version = sessionContext.getPrimaryConductor().getVersion();
114 rpcNotificationProviderService = OFSessionUtil.getSessionManager().getNotificationProviderService();
116 rpcTaskContext = new OFRpcTaskContext();
117 rpcTaskContext.setSession(sessionContext);
118 rpcTaskContext.setMessageService(messageService);
119 rpcTaskContext.setRpcNotificationProviderService(rpcNotificationProviderService);
120 rpcTaskContext.setMaxTimeout(maxTimeout);
121 rpcTaskContext.setMaxTimeoutUnit(maxTimeoutUnit);
122 rpcTaskContext.setRpcPool(OFSessionUtil.getSessionManager().getRpcPool());
123 rpcTaskContext.setMessageSpy(OFSessionUtil.getSessionManager().getMessageSpy());
127 public Future<RpcResult<AddFlowOutput>> addFlow(final AddFlowInput input) {
128 LOG.debug("Calling the FlowMod RPC method on MessageDispatchService");
129 // use primary connection
130 SwitchConnectionDistinguisher cookie = null;
132 OFRpcTask<AddFlowInput, RpcResult<UpdateFlowOutput>> task =
133 OFRpcTaskFactory.createAddFlowTask(rpcTaskContext, input, cookie);
134 ListenableFuture<RpcResult<UpdateFlowOutput>> result = task.submit();
136 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForAddFlowOutput());
141 public Future<RpcResult<AddGroupOutput>> addGroup(final AddGroupInput input) {
142 LOG.debug("Calling the GroupMod RPC method on MessageDispatchService");
144 // use primary connection
145 SwitchConnectionDistinguisher cookie = null;
147 OFRpcTask<AddGroupInput, RpcResult<UpdateGroupOutput>> task =
148 OFRpcTaskFactory.createAddGroupTask(rpcTaskContext, input, cookie);
149 ListenableFuture<RpcResult<UpdateGroupOutput>> result = task.submit();
151 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForAddGroupOutput());
155 public Future<RpcResult<AddMeterOutput>> addMeter(final AddMeterInput input) {
156 LOG.debug("Calling the MeterMod RPC method on MessageDispatchService");
158 // use primary connection
159 SwitchConnectionDistinguisher cookie = null;
161 OFRpcTask<AddMeterInput, RpcResult<UpdateMeterOutput>> task =
162 OFRpcTaskFactory.createAddMeterTask(rpcTaskContext, input, cookie);
163 ListenableFuture<RpcResult<UpdateMeterOutput>> result = task.submit();
165 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForAddMeterOutput());
169 public Future<RpcResult<RemoveFlowOutput>> removeFlow(final RemoveFlowInput input) {
170 LOG.debug("Calling the removeFlow RPC method on MessageDispatchService");
172 // use primary connection
173 SwitchConnectionDistinguisher cookie = null;
174 OFRpcTask<RemoveFlowInput, RpcResult<UpdateFlowOutput>> task =
175 OFRpcTaskFactory.createRemoveFlowTask(rpcTaskContext, input, cookie);
176 ListenableFuture<RpcResult<UpdateFlowOutput>> result = task.submit();
178 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForRemoveFlowOutput());
182 public Future<RpcResult<RemoveGroupOutput>> removeGroup(final RemoveGroupInput input) {
183 LOG.debug("Calling the Remove Group RPC method on MessageDispatchService");
185 SwitchConnectionDistinguisher cookie = null;
186 OFRpcTask<RemoveGroupInput, RpcResult<UpdateGroupOutput>> task =
187 OFRpcTaskFactory.createRemoveGroupTask(rpcTaskContext, input, cookie);
188 ListenableFuture<RpcResult<UpdateGroupOutput>> result = task.submit();
190 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForRemoveGroupOutput());
194 public Future<RpcResult<RemoveMeterOutput>> removeMeter(final RemoveMeterInput input) {
195 LOG.debug("Calling the Remove MeterMod RPC method on MessageDispatchService");
197 SwitchConnectionDistinguisher cookie = null;
198 OFRpcTask<RemoveMeterInput, RpcResult<UpdateMeterOutput>> task =
199 OFRpcTaskFactory.createRemoveMeterTask(rpcTaskContext, input, cookie);
200 ListenableFuture<RpcResult<UpdateMeterOutput>> result = task.submit();
202 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForRemoveMeterOutput());
206 public Future<RpcResult<Void>> transmitPacket(final TransmitPacketInput input) {
207 LOG.debug("TransmitPacket - {}", input);
208 // Convert TransmitPacket to PacketOutInput
209 PacketOutInput message = PacketOutConvertor.toPacketOutInput(input, version, sessionContext.getNextXid(),
210 sessionContext.getFeatures().getDatapathId());
212 SwitchConnectionDistinguisher cookie = null;
213 ConnectionCookie connectionCookie = input.getConnectionCookie();
214 if (connectionCookie != null && connectionCookie.getValue() != null) {
215 cookie = new SwitchConnectionCookieOFImpl(connectionCookie.getValue());
218 LOG.debug("Calling the transmitPacket RPC method");
219 return messageService.packetOut(message, cookie);
223 public Future<RpcResult<UpdateFlowOutput>> updateFlow(final UpdateFlowInput input) {
224 LOG.debug("Calling the updateFlow RPC method on MessageDispatchService");
226 // use primary connection
227 SwitchConnectionDistinguisher cookie = null;
229 OFRpcTask<UpdateFlowInput, RpcResult<UpdateFlowOutput>> task =
230 OFRpcTaskFactory.createUpdateFlowTask(rpcTaskContext, input, cookie);
231 ListenableFuture<RpcResult<UpdateFlowOutput>> result = task.submit();
237 public Future<RpcResult<UpdateGroupOutput>> updateGroup(final UpdateGroupInput input) {
238 LOG.debug("Calling the update Group Mod RPC method on MessageDispatchService");
240 // use primary connection
241 SwitchConnectionDistinguisher cookie = null;
243 OFRpcTask<UpdateGroupInput, RpcResult<UpdateGroupOutput>> task =
244 OFRpcTaskFactory.createUpdateGroupTask(rpcTaskContext, input, cookie);
245 ListenableFuture<RpcResult<UpdateGroupOutput>> result = task.submit();
251 public Future<RpcResult<UpdateMeterOutput>> updateMeter(final UpdateMeterInput input) {
252 LOG.debug("Calling the MeterMod RPC method on MessageDispatchService");
254 // use primary connection
255 SwitchConnectionDistinguisher cookie = null;
257 OFRpcTask<UpdateMeterInput, RpcResult<UpdateMeterOutput>> task =
258 OFRpcTaskFactory.createUpdateMeterTask(rpcTaskContext, input, cookie);
259 ListenableFuture<RpcResult<UpdateMeterOutput>> result = task.submit();
265 public NodeId getNodeId() {
271 public Future<RpcResult<GetAllGroupStatisticsOutput>> getAllGroupStatistics(final GetAllGroupStatisticsInput input) {
272 // use primary connection
273 LOG.debug("Calling the getAllGroupStatistics RPC method on MessageDispatchService");
274 SwitchConnectionDistinguisher cookie = null;
276 OFRpcTask<GetAllGroupStatisticsInput, RpcResult<GetAllGroupStatisticsOutput>> task =
277 OFRpcTaskFactory.createGetAllGroupStatisticsTask(rpcTaskContext, input, cookie);
278 ListenableFuture<RpcResult<GetAllGroupStatisticsOutput>> result = task.submit();
285 public Future<RpcResult<GetGroupDescriptionOutput>> getGroupDescription(final GetGroupDescriptionInput input) {
286 LOG.debug("Calling the getGroupDescription RPC method on MessageDispatchService");
287 SwitchConnectionDistinguisher cookie = null;
289 OFRpcTask<GetGroupDescriptionInput, RpcResult<GetGroupDescriptionOutput>> task =
290 OFRpcTaskFactory.createGetGroupDescriptionTask(rpcTaskContext, input, cookie);
291 ListenableFuture<RpcResult<GetGroupDescriptionOutput>> result = task.submit();
296 public Future<RpcResult<GetGroupFeaturesOutput>> getGroupFeatures(final GetGroupFeaturesInput input) {
297 LOG.debug("Calling the getGroupFeatures RPC method on MessageDispatchService");
298 SwitchConnectionDistinguisher cookie = null;
300 OFRpcTask<GetGroupFeaturesInput, RpcResult<GetGroupFeaturesOutput>> task =
301 OFRpcTaskFactory.createGetGroupFeaturesTask(rpcTaskContext, input, cookie);
302 ListenableFuture<RpcResult<GetGroupFeaturesOutput>> result = task.submit();
307 public Future<RpcResult<GetGroupStatisticsOutput>> getGroupStatistics(final GetGroupStatisticsInput input) {
308 LOG.debug("Calling the getGroupStatistics RPC method on MessageDispatchService");
309 SwitchConnectionDistinguisher cookie = null;
311 OFRpcTask<GetGroupStatisticsInput, RpcResult<GetGroupStatisticsOutput>> task =
312 OFRpcTaskFactory.createGetGroupStatisticsTask(rpcTaskContext, input, cookie);
313 ListenableFuture<RpcResult<GetGroupStatisticsOutput>> result = task.submit();
318 public Future<RpcResult<GetAllMeterConfigStatisticsOutput>> getAllMeterConfigStatistics(
319 final GetAllMeterConfigStatisticsInput input) {
320 LOG.debug("Calling the getAllMeterConfigStatistics RPC method on MessageDispatchService");
321 SwitchConnectionDistinguisher cookie = null;
323 OFRpcTask<GetAllMeterConfigStatisticsInput, RpcResult<GetAllMeterConfigStatisticsOutput>> task =
324 OFRpcTaskFactory.createGetAllMeterConfigStatisticsTask(rpcTaskContext, input, cookie);
325 ListenableFuture<RpcResult<GetAllMeterConfigStatisticsOutput>> result = task.submit();
330 public Future<RpcResult<GetAllMeterStatisticsOutput>> getAllMeterStatistics(
331 final GetAllMeterStatisticsInput input) {
332 LOG.debug("Calling the getAllMeterStatistics RPC method on MessageDispatchService");
333 SwitchConnectionDistinguisher cookie = null;
335 OFRpcTask<GetAllMeterStatisticsInput, RpcResult<GetAllMeterStatisticsOutput>> task =
336 OFRpcTaskFactory.createGetAllMeterStatisticsTask(rpcTaskContext, input, cookie);
337 ListenableFuture<RpcResult<GetAllMeterStatisticsOutput>> result = task.submit();
342 public Future<RpcResult<GetMeterFeaturesOutput>> getMeterFeatures(
343 final GetMeterFeaturesInput input) {
344 LOG.debug("Calling the getMeterFeatures RPC method on MessageDispatchService");
345 SwitchConnectionDistinguisher cookie = null;
347 OFRpcTask<GetMeterFeaturesInput, RpcResult<GetMeterFeaturesOutput>> task =
348 OFRpcTaskFactory.createGetMeterFeaturesTask(rpcTaskContext, input, cookie);
349 ListenableFuture<RpcResult<GetMeterFeaturesOutput>> result = task.submit();
354 public Future<RpcResult<GetMeterStatisticsOutput>> getMeterStatistics(
355 final GetMeterStatisticsInput input) {
356 LOG.debug("Calling the getMeterStatistics RPC method on MessageDispatchService");
357 SwitchConnectionDistinguisher cookie = null;
359 OFRpcTask<GetMeterStatisticsInput, RpcResult<GetMeterStatisticsOutput>> task =
360 OFRpcTaskFactory.createGetMeterStatisticsTask(rpcTaskContext, input, cookie);
361 ListenableFuture<RpcResult<GetMeterStatisticsOutput>> result = task.submit();
366 public Future<RpcResult<GetAllNodeConnectorsStatisticsOutput>> getAllNodeConnectorsStatistics(
367 final GetAllNodeConnectorsStatisticsInput input) {
368 LOG.debug("Calling the getAllNodeConnectorsStatistics RPC method on MessageDispatchService");
369 SwitchConnectionDistinguisher cookie = null;
371 OFRpcTask<GetAllNodeConnectorsStatisticsInput, RpcResult<GetAllNodeConnectorsStatisticsOutput>> task =
372 OFRpcTaskFactory.createGetAllNodeConnectorsStatisticsTask(rpcTaskContext, input, cookie);
373 ListenableFuture<RpcResult<GetAllNodeConnectorsStatisticsOutput>> result = task.submit();
378 public Future<RpcResult<GetNodeConnectorStatisticsOutput>> getNodeConnectorStatistics(
379 final GetNodeConnectorStatisticsInput input) {
380 LOG.debug("Calling the getNodeConnectorStatistics RPC method on MessageDispatchService");
381 SwitchConnectionDistinguisher cookie = null;
383 OFRpcTask<GetNodeConnectorStatisticsInput, RpcResult<GetNodeConnectorStatisticsOutput>> task =
384 OFRpcTaskFactory.createGetNodeConnectorStatisticsTask(rpcTaskContext, input, cookie);
385 ListenableFuture<RpcResult<GetNodeConnectorStatisticsOutput>> result = task.submit();
390 public Future<RpcResult<UpdatePortOutput>> updatePort(final UpdatePortInput input) {
391 LOG.debug("Calling the updatePort RPC method on MessageDispatchService");
393 // use primary connection
394 SwitchConnectionDistinguisher cookie = null;
396 OFRpcTask<UpdatePortInput, RpcResult<UpdatePortOutput>> task =
397 OFRpcTaskFactory.createUpdatePortTask(rpcTaskContext, input, cookie);
398 ListenableFuture<RpcResult<UpdatePortOutput>> result = task.submit();
404 public Future<RpcResult<UpdateTableOutput>> updateTable(final UpdateTableInput input) {
405 LOG.debug("Calling the updateTable RPC method on MessageDispatchService");
407 SwitchConnectionDistinguisher cookie = null;
409 OFRpcTask<UpdateTableInput, RpcResult<UpdateTableOutput>> task =
410 OFRpcTaskFactory.createUpdateTableTask(rpcTaskContext, input, cookie);
411 ListenableFuture<RpcResult<UpdateTableOutput>> result = task.submit();
417 public Future<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> getAllFlowStatisticsFromFlowTable(
418 final GetAllFlowStatisticsFromFlowTableInput input) {
419 LOG.debug("Calling the getAllFlowStatisticsFromFlowTable RPC method on MessageDispatchService");
420 SwitchConnectionDistinguisher cookie = null;
422 OFRpcTask<GetAllFlowStatisticsFromFlowTableInput, RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> task =
423 OFRpcTaskFactory.createGetAllFlowStatisticsFromFlowTableTask(rpcTaskContext, input, cookie);
424 ListenableFuture<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> result = task.submit();
429 public Future<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> getAllFlowsStatisticsFromAllFlowTables(
430 final GetAllFlowsStatisticsFromAllFlowTablesInput input) {
431 LOG.debug("Calling the getAllFlowsStatisticsFromAllFlowTables RPC method on MessageDispatchService");
432 SwitchConnectionDistinguisher cookie = null;
434 OFRpcTask<GetAllFlowsStatisticsFromAllFlowTablesInput, RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> task =
435 OFRpcTaskFactory.createGetAllFlowsStatisticsFromAllFlowTablesTask(rpcTaskContext, input, cookie);
436 ListenableFuture<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> result = task.submit();
441 public Future<RpcResult<GetFlowStatisticsFromFlowTableOutput>> getFlowStatisticsFromFlowTable(
442 final GetFlowStatisticsFromFlowTableInput input) {
443 LOG.debug("Calling the getFlowStatisticsFromFlowTable RPC method on MessageDispatchService");
444 SwitchConnectionDistinguisher cookie = null;
446 OFRpcTask<GetFlowStatisticsFromFlowTableInput, RpcResult<GetFlowStatisticsFromFlowTableOutput>> task =
447 OFRpcTaskFactory.createGetFlowStatisticsFromFlowTableTask(rpcTaskContext, input, cookie);
448 ListenableFuture<RpcResult<GetFlowStatisticsFromFlowTableOutput>> result = task.submit();
453 public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> getAggregateFlowStatisticsFromFlowTableForAllFlows(
454 final GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input) {
455 LOG.debug("Calling the getAggregateFlowStatisticsFromFlowTableForAllFlows RPC method on MessageDispatchService");
456 SwitchConnectionDistinguisher cookie = null;
458 OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> task =
459 OFRpcTaskFactory.createGetAggregateFlowStatisticsFromFlowTableForAllFlowsTask(rpcTaskContext, input, cookie);
460 ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> result = task.submit();
465 public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> getAggregateFlowStatisticsFromFlowTableForGivenMatch(
466 final GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput input) {
467 LOG.debug("Calling the getAggregateFlowStatisticsFromFlowTableForGivenMatch RPC method on MessageDispatchService");
468 SwitchConnectionDistinguisher cookie = null;
470 OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> task =
471 OFRpcTaskFactory.createGetAggregateFlowStatisticsFromFlowTableForGivenMatchTask(rpcTaskContext, input, cookie);
472 ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> result = task.submit();
477 public Future<RpcResult<GetFlowTablesStatisticsOutput>> getFlowTablesStatistics(
478 final GetFlowTablesStatisticsInput input) {
479 LOG.debug("Calling the getFlowTablesStatistics RPC method on MessageDispatchService");
480 SwitchConnectionDistinguisher cookie = null;
482 OFRpcTask<GetFlowTablesStatisticsInput, RpcResult<GetFlowTablesStatisticsOutput>> task =
483 OFRpcTaskFactory.createGetFlowTablesStatisticsTask(rpcTaskContext, input, cookie);
484 ListenableFuture<RpcResult<GetFlowTablesStatisticsOutput>> result = task.submit();
489 public Future<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> getAllQueuesStatisticsFromAllPorts(
490 final GetAllQueuesStatisticsFromAllPortsInput input) {
491 LOG.debug("Calling the getAllQueuesStatisticsFromAllPorts RPC method on MessageDispatchService");
492 SwitchConnectionDistinguisher cookie = null;
494 OFRpcTask<GetAllQueuesStatisticsFromAllPortsInput, RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> task =
495 OFRpcTaskFactory.createGetAllQueuesStatisticsFromAllPortsTask(rpcTaskContext, input, cookie);
496 ListenableFuture<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> result = task.submit();
501 public Future<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> getAllQueuesStatisticsFromGivenPort(
502 final GetAllQueuesStatisticsFromGivenPortInput input) {
503 LOG.debug("Calling the getAllQueuesStatisticsFromGivenPort RPC method on MessageDispatchService");
504 SwitchConnectionDistinguisher cookie = null;
506 OFRpcTask<GetAllQueuesStatisticsFromGivenPortInput, RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> task =
507 OFRpcTaskFactory.createGetAllQueuesStatisticsFromGivenPortTask(rpcTaskContext, input, cookie);
508 ListenableFuture<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> result = task.submit();
513 public Future<RpcResult<GetQueueStatisticsFromGivenPortOutput>> getQueueStatisticsFromGivenPort(
514 final GetQueueStatisticsFromGivenPortInput input) {
515 LOG.debug("Calling the getQueueStatisticsFromGivenPort RPC method on MessageDispatchService");
516 SwitchConnectionDistinguisher cookie = null;
518 OFRpcTask<GetQueueStatisticsFromGivenPortInput, RpcResult<GetQueueStatisticsFromGivenPortOutput>> task =
519 OFRpcTaskFactory.createGetQueueStatisticsFromGivenPortTask(rpcTaskContext, input, cookie);
520 ListenableFuture<RpcResult<GetQueueStatisticsFromGivenPortOutput>> result = task.submit();