import com.google.common.base.MoreObjects;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.MoreExecutors;
import java.util.List;
import java.util.Optional;
-import java.util.concurrent.Future;
import java.util.stream.Collectors;
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
}
@Override
- public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> handleAndReply(
+ public ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> handleAndReply(
final GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput input) {
return Futures.transform(handleServiceCall(input),
(Function<RpcResult<List<MultipartReply>>,
return RpcResultBuilder
.<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>failed()
.withRpcErrors(result.getErrors()).build();
- });
+ }, MoreExecutors.directExecutor());
}
}