import java.util.Collections;
import java.util.List;
import java.util.Optional;
-import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.api.openflow.device.Xid;
import org.opendaylight.openflowplugin.impl.datastore.MultipartWriterProvider;
import org.opendaylight.openflowplugin.impl.services.AbstractTableMultipartService;
import org.opendaylight.openflowplugin.impl.services.util.RequestInputUtils;
-import org.opendaylight.openflowplugin.impl.services.util.ServiceException;
import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev150304.TransactionId;
}
@Override
- protected OfHeader buildRequest(final Xid xid, final UpdateTableInput input) throws ServiceException {
+ protected OfHeader buildRequest(final Xid xid, final UpdateTableInput input) {
final Optional<List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart
.request.multipart.request.body.multipart.request.table.features._case.multipart.request
.table.features.TableFeatures>> tableFeatures =
}
@Override
-
- public Future<RpcResult<UpdateTableOutput>> handleAndReply(UpdateTableInput input) {
+ public ListenableFuture<RpcResult<UpdateTableOutput>> handleAndReply(UpdateTableInput input) {
final ListenableFuture<RpcResult<List<MultipartReply>>> multipartFuture = handleServiceCall(input);
final SettableFuture<RpcResult<UpdateTableOutput>> finalFuture = SettableFuture.create();
class CallBackImpl implements FutureCallback<RpcResult<List<MultipartReply>>> {
@Override
@SuppressWarnings("checkstyle:IllegalCatch")
- public void onSuccess(@Nonnull final RpcResult<List<MultipartReply>> result) {
+ public void onSuccess(final RpcResult<List<MultipartReply>> result) {
if (result.isSuccessful()) {
final List<MultipartReply> multipartReplies = result.getResult();
@Override
public void onFailure(final Throwable throwable) {
- LOG.error("Failure multipart response for table features request. Exception: {}", throwable);
+ LOG.error("Failure multipart response for table features request", throwable);
finalFuture.set(RpcResultBuilder.<UpdateTableOutput>failed()
.withError(ErrorType.RPC, "Future error", throwable).build());
}