All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.mediaconnect.AWSMediaConnectAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS MediaConnect module holds the client classes that are used for communicating with AWS MediaConnect Service

The newest version!
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.mediaconnect;

import javax.annotation.Generated;

import com.amazonaws.services.mediaconnect.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing AWS MediaConnect asynchronously. Each asynchronous method will return a Java Future object
 * representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive
 * notification when an asynchronous operation completes.
 * 

* API for AWS Elemental MediaConnect */ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSMediaConnectAsyncClient extends AWSMediaConnectClient implements AWSMediaConnectAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSMediaConnectAsyncClientBuilder asyncBuilder() { return AWSMediaConnectAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AWS MediaConnect using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSMediaConnectAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AWS MediaConnect using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSMediaConnectAsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) { super(asyncClientParams, endpointDiscoveryEnabled); this.executorService = asyncClientParams.getExecutor(); } /** * Returns the executor service used by this client to execute async requests. * * @return The executor service used by this client to execute async requests. */ public ExecutorService getExecutorService() { return executorService; } @Override public java.util.concurrent.Future addBridgeOutputsAsync(AddBridgeOutputsRequest request) { return addBridgeOutputsAsync(request, null); } @Override public java.util.concurrent.Future addBridgeOutputsAsync(final AddBridgeOutputsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddBridgeOutputsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddBridgeOutputsResult call() throws Exception { AddBridgeOutputsResult result = null; try { result = executeAddBridgeOutputs(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future addBridgeSourcesAsync(AddBridgeSourcesRequest request) { return addBridgeSourcesAsync(request, null); } @Override public java.util.concurrent.Future addBridgeSourcesAsync(final AddBridgeSourcesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddBridgeSourcesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddBridgeSourcesResult call() throws Exception { AddBridgeSourcesResult result = null; try { result = executeAddBridgeSources(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future addFlowMediaStreamsAsync(AddFlowMediaStreamsRequest request) { return addFlowMediaStreamsAsync(request, null); } @Override public java.util.concurrent.Future addFlowMediaStreamsAsync(final AddFlowMediaStreamsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddFlowMediaStreamsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddFlowMediaStreamsResult call() throws Exception { AddFlowMediaStreamsResult result = null; try { result = executeAddFlowMediaStreams(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future addFlowOutputsAsync(AddFlowOutputsRequest request) { return addFlowOutputsAsync(request, null); } @Override public java.util.concurrent.Future addFlowOutputsAsync(final AddFlowOutputsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddFlowOutputsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddFlowOutputsResult call() throws Exception { AddFlowOutputsResult result = null; try { result = executeAddFlowOutputs(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future addFlowSourcesAsync(AddFlowSourcesRequest request) { return addFlowSourcesAsync(request, null); } @Override public java.util.concurrent.Future addFlowSourcesAsync(final AddFlowSourcesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddFlowSourcesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddFlowSourcesResult call() throws Exception { AddFlowSourcesResult result = null; try { result = executeAddFlowSources(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future addFlowVpcInterfacesAsync(AddFlowVpcInterfacesRequest request) { return addFlowVpcInterfacesAsync(request, null); } @Override public java.util.concurrent.Future addFlowVpcInterfacesAsync(final AddFlowVpcInterfacesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddFlowVpcInterfacesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddFlowVpcInterfacesResult call() throws Exception { AddFlowVpcInterfacesResult result = null; try { result = executeAddFlowVpcInterfaces(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createBridgeAsync(CreateBridgeRequest request) { return createBridgeAsync(request, null); } @Override public java.util.concurrent.Future createBridgeAsync(final CreateBridgeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBridgeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBridgeResult call() throws Exception { CreateBridgeResult result = null; try { result = executeCreateBridge(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createFlowAsync(CreateFlowRequest request) { return createFlowAsync(request, null); } @Override public java.util.concurrent.Future createFlowAsync(final CreateFlowRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFlowRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFlowResult call() throws Exception { CreateFlowResult result = null; try { result = executeCreateFlow(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createGatewayAsync(CreateGatewayRequest request) { return createGatewayAsync(request, null); } @Override public java.util.concurrent.Future createGatewayAsync(final CreateGatewayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateGatewayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateGatewayResult call() throws Exception { CreateGatewayResult result = null; try { result = executeCreateGateway(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteBridgeAsync(DeleteBridgeRequest request) { return deleteBridgeAsync(request, null); } @Override public java.util.concurrent.Future deleteBridgeAsync(final DeleteBridgeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteBridgeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteBridgeResult call() throws Exception { DeleteBridgeResult result = null; try { result = executeDeleteBridge(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteFlowAsync(DeleteFlowRequest request) { return deleteFlowAsync(request, null); } @Override public java.util.concurrent.Future deleteFlowAsync(final DeleteFlowRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFlowRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFlowResult call() throws Exception { DeleteFlowResult result = null; try { result = executeDeleteFlow(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteGatewayAsync(DeleteGatewayRequest request) { return deleteGatewayAsync(request, null); } @Override public java.util.concurrent.Future deleteGatewayAsync(final DeleteGatewayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteGatewayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteGatewayResult call() throws Exception { DeleteGatewayResult result = null; try { result = executeDeleteGateway(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deregisterGatewayInstanceAsync(DeregisterGatewayInstanceRequest request) { return deregisterGatewayInstanceAsync(request, null); } @Override public java.util.concurrent.Future deregisterGatewayInstanceAsync(final DeregisterGatewayInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeregisterGatewayInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeregisterGatewayInstanceResult call() throws Exception { DeregisterGatewayInstanceResult result = null; try { result = executeDeregisterGatewayInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeBridgeAsync(DescribeBridgeRequest request) { return describeBridgeAsync(request, null); } @Override public java.util.concurrent.Future describeBridgeAsync(final DescribeBridgeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeBridgeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeBridgeResult call() throws Exception { DescribeBridgeResult result = null; try { result = executeDescribeBridge(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeFlowAsync(DescribeFlowRequest request) { return describeFlowAsync(request, null); } @Override public java.util.concurrent.Future describeFlowAsync(final DescribeFlowRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFlowRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFlowResult call() throws Exception { DescribeFlowResult result = null; try { result = executeDescribeFlow(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeFlowSourceMetadataAsync(DescribeFlowSourceMetadataRequest request) { return describeFlowSourceMetadataAsync(request, null); } @Override public java.util.concurrent.Future describeFlowSourceMetadataAsync(final DescribeFlowSourceMetadataRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFlowSourceMetadataRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFlowSourceMetadataResult call() throws Exception { DescribeFlowSourceMetadataResult result = null; try { result = executeDescribeFlowSourceMetadata(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeGatewayAsync(DescribeGatewayRequest request) { return describeGatewayAsync(request, null); } @Override public java.util.concurrent.Future describeGatewayAsync(final DescribeGatewayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeGatewayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeGatewayResult call() throws Exception { DescribeGatewayResult result = null; try { result = executeDescribeGateway(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeGatewayInstanceAsync(DescribeGatewayInstanceRequest request) { return describeGatewayInstanceAsync(request, null); } @Override public java.util.concurrent.Future describeGatewayInstanceAsync(final DescribeGatewayInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeGatewayInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeGatewayInstanceResult call() throws Exception { DescribeGatewayInstanceResult result = null; try { result = executeDescribeGatewayInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeOfferingAsync(DescribeOfferingRequest request) { return describeOfferingAsync(request, null); } @Override public java.util.concurrent.Future describeOfferingAsync(final DescribeOfferingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeOfferingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeOfferingResult call() throws Exception { DescribeOfferingResult result = null; try { result = executeDescribeOffering(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeReservationAsync(DescribeReservationRequest request) { return describeReservationAsync(request, null); } @Override public java.util.concurrent.Future describeReservationAsync(final DescribeReservationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeReservationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeReservationResult call() throws Exception { DescribeReservationResult result = null; try { result = executeDescribeReservation(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future grantFlowEntitlementsAsync(GrantFlowEntitlementsRequest request) { return grantFlowEntitlementsAsync(request, null); } @Override public java.util.concurrent.Future grantFlowEntitlementsAsync(final GrantFlowEntitlementsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GrantFlowEntitlementsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GrantFlowEntitlementsResult call() throws Exception { GrantFlowEntitlementsResult result = null; try { result = executeGrantFlowEntitlements(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listBridgesAsync(ListBridgesRequest request) { return listBridgesAsync(request, null); } @Override public java.util.concurrent.Future listBridgesAsync(final ListBridgesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListBridgesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListBridgesResult call() throws Exception { ListBridgesResult result = null; try { result = executeListBridges(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listEntitlementsAsync(ListEntitlementsRequest request) { return listEntitlementsAsync(request, null); } @Override public java.util.concurrent.Future listEntitlementsAsync(final ListEntitlementsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListEntitlementsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListEntitlementsResult call() throws Exception { ListEntitlementsResult result = null; try { result = executeListEntitlements(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listFlowsAsync(ListFlowsRequest request) { return listFlowsAsync(request, null); } @Override public java.util.concurrent.Future listFlowsAsync(final ListFlowsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListFlowsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListFlowsResult call() throws Exception { ListFlowsResult result = null; try { result = executeListFlows(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listGatewayInstancesAsync(ListGatewayInstancesRequest request) { return listGatewayInstancesAsync(request, null); } @Override public java.util.concurrent.Future listGatewayInstancesAsync(final ListGatewayInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListGatewayInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListGatewayInstancesResult call() throws Exception { ListGatewayInstancesResult result = null; try { result = executeListGatewayInstances(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listGatewaysAsync(ListGatewaysRequest request) { return listGatewaysAsync(request, null); } @Override public java.util.concurrent.Future listGatewaysAsync(final ListGatewaysRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListGatewaysRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListGatewaysResult call() throws Exception { ListGatewaysResult result = null; try { result = executeListGateways(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listOfferingsAsync(ListOfferingsRequest request) { return listOfferingsAsync(request, null); } @Override public java.util.concurrent.Future listOfferingsAsync(final ListOfferingsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListOfferingsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListOfferingsResult call() throws Exception { ListOfferingsResult result = null; try { result = executeListOfferings(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listReservationsAsync(ListReservationsRequest request) { return listReservationsAsync(request, null); } @Override public java.util.concurrent.Future listReservationsAsync(final ListReservationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListReservationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListReservationsResult call() throws Exception { ListReservationsResult result = null; try { result = executeListReservations(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest request) { return listTagsForResourceAsync(request, null); } @Override public java.util.concurrent.Future listTagsForResourceAsync(final ListTagsForResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTagsForResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTagsForResourceResult call() throws Exception { ListTagsForResourceResult result = null; try { result = executeListTagsForResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future purchaseOfferingAsync(PurchaseOfferingRequest request) { return purchaseOfferingAsync(request, null); } @Override public java.util.concurrent.Future purchaseOfferingAsync(final PurchaseOfferingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PurchaseOfferingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PurchaseOfferingResult call() throws Exception { PurchaseOfferingResult result = null; try { result = executePurchaseOffering(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future removeBridgeOutputAsync(RemoveBridgeOutputRequest request) { return removeBridgeOutputAsync(request, null); } @Override public java.util.concurrent.Future removeBridgeOutputAsync(final RemoveBridgeOutputRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveBridgeOutputRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveBridgeOutputResult call() throws Exception { RemoveBridgeOutputResult result = null; try { result = executeRemoveBridgeOutput(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future removeBridgeSourceAsync(RemoveBridgeSourceRequest request) { return removeBridgeSourceAsync(request, null); } @Override public java.util.concurrent.Future removeBridgeSourceAsync(final RemoveBridgeSourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveBridgeSourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveBridgeSourceResult call() throws Exception { RemoveBridgeSourceResult result = null; try { result = executeRemoveBridgeSource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future removeFlowMediaStreamAsync(RemoveFlowMediaStreamRequest request) { return removeFlowMediaStreamAsync(request, null); } @Override public java.util.concurrent.Future removeFlowMediaStreamAsync(final RemoveFlowMediaStreamRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveFlowMediaStreamRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveFlowMediaStreamResult call() throws Exception { RemoveFlowMediaStreamResult result = null; try { result = executeRemoveFlowMediaStream(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future removeFlowOutputAsync(RemoveFlowOutputRequest request) { return removeFlowOutputAsync(request, null); } @Override public java.util.concurrent.Future removeFlowOutputAsync(final RemoveFlowOutputRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveFlowOutputRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveFlowOutputResult call() throws Exception { RemoveFlowOutputResult result = null; try { result = executeRemoveFlowOutput(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future removeFlowSourceAsync(RemoveFlowSourceRequest request) { return removeFlowSourceAsync(request, null); } @Override public java.util.concurrent.Future removeFlowSourceAsync(final RemoveFlowSourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveFlowSourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveFlowSourceResult call() throws Exception { RemoveFlowSourceResult result = null; try { result = executeRemoveFlowSource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future removeFlowVpcInterfaceAsync(RemoveFlowVpcInterfaceRequest request) { return removeFlowVpcInterfaceAsync(request, null); } @Override public java.util.concurrent.Future removeFlowVpcInterfaceAsync(final RemoveFlowVpcInterfaceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveFlowVpcInterfaceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveFlowVpcInterfaceResult call() throws Exception { RemoveFlowVpcInterfaceResult result = null; try { result = executeRemoveFlowVpcInterface(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future revokeFlowEntitlementAsync(RevokeFlowEntitlementRequest request) { return revokeFlowEntitlementAsync(request, null); } @Override public java.util.concurrent.Future revokeFlowEntitlementAsync(final RevokeFlowEntitlementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RevokeFlowEntitlementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RevokeFlowEntitlementResult call() throws Exception { RevokeFlowEntitlementResult result = null; try { result = executeRevokeFlowEntitlement(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future startFlowAsync(StartFlowRequest request) { return startFlowAsync(request, null); } @Override public java.util.concurrent.Future startFlowAsync(final StartFlowRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartFlowRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartFlowResult call() throws Exception { StartFlowResult result = null; try { result = executeStartFlow(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future stopFlowAsync(StopFlowRequest request) { return stopFlowAsync(request, null); } @Override public java.util.concurrent.Future stopFlowAsync(final StopFlowRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopFlowRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopFlowResult call() throws Exception { StopFlowResult result = null; try { result = executeStopFlow(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future tagResourceAsync(TagResourceRequest request) { return tagResourceAsync(request, null); } @Override public java.util.concurrent.Future tagResourceAsync(final TagResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final TagResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public TagResourceResult call() throws Exception { TagResourceResult result = null; try { result = executeTagResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future untagResourceAsync(UntagResourceRequest request) { return untagResourceAsync(request, null); } @Override public java.util.concurrent.Future untagResourceAsync(final UntagResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UntagResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UntagResourceResult call() throws Exception { UntagResourceResult result = null; try { result = executeUntagResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateBridgeAsync(UpdateBridgeRequest request) { return updateBridgeAsync(request, null); } @Override public java.util.concurrent.Future updateBridgeAsync(final UpdateBridgeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateBridgeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateBridgeResult call() throws Exception { UpdateBridgeResult result = null; try { result = executeUpdateBridge(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateBridgeOutputAsync(UpdateBridgeOutputRequest request) { return updateBridgeOutputAsync(request, null); } @Override public java.util.concurrent.Future updateBridgeOutputAsync(final UpdateBridgeOutputRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateBridgeOutputRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateBridgeOutputResult call() throws Exception { UpdateBridgeOutputResult result = null; try { result = executeUpdateBridgeOutput(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateBridgeSourceAsync(UpdateBridgeSourceRequest request) { return updateBridgeSourceAsync(request, null); } @Override public java.util.concurrent.Future updateBridgeSourceAsync(final UpdateBridgeSourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateBridgeSourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateBridgeSourceResult call() throws Exception { UpdateBridgeSourceResult result = null; try { result = executeUpdateBridgeSource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateBridgeStateAsync(UpdateBridgeStateRequest request) { return updateBridgeStateAsync(request, null); } @Override public java.util.concurrent.Future updateBridgeStateAsync(final UpdateBridgeStateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateBridgeStateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateBridgeStateResult call() throws Exception { UpdateBridgeStateResult result = null; try { result = executeUpdateBridgeState(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateFlowAsync(UpdateFlowRequest request) { return updateFlowAsync(request, null); } @Override public java.util.concurrent.Future updateFlowAsync(final UpdateFlowRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFlowRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFlowResult call() throws Exception { UpdateFlowResult result = null; try { result = executeUpdateFlow(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateFlowEntitlementAsync(UpdateFlowEntitlementRequest request) { return updateFlowEntitlementAsync(request, null); } @Override public java.util.concurrent.Future updateFlowEntitlementAsync(final UpdateFlowEntitlementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFlowEntitlementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFlowEntitlementResult call() throws Exception { UpdateFlowEntitlementResult result = null; try { result = executeUpdateFlowEntitlement(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateFlowMediaStreamAsync(UpdateFlowMediaStreamRequest request) { return updateFlowMediaStreamAsync(request, null); } @Override public java.util.concurrent.Future updateFlowMediaStreamAsync(final UpdateFlowMediaStreamRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFlowMediaStreamRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFlowMediaStreamResult call() throws Exception { UpdateFlowMediaStreamResult result = null; try { result = executeUpdateFlowMediaStream(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateFlowOutputAsync(UpdateFlowOutputRequest request) { return updateFlowOutputAsync(request, null); } @Override public java.util.concurrent.Future updateFlowOutputAsync(final UpdateFlowOutputRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFlowOutputRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFlowOutputResult call() throws Exception { UpdateFlowOutputResult result = null; try { result = executeUpdateFlowOutput(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateFlowSourceAsync(UpdateFlowSourceRequest request) { return updateFlowSourceAsync(request, null); } @Override public java.util.concurrent.Future updateFlowSourceAsync(final UpdateFlowSourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFlowSourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFlowSourceResult call() throws Exception { UpdateFlowSourceResult result = null; try { result = executeUpdateFlowSource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateGatewayInstanceAsync(UpdateGatewayInstanceRequest request) { return updateGatewayInstanceAsync(request, null); } @Override public java.util.concurrent.Future updateGatewayInstanceAsync(final UpdateGatewayInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateGatewayInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateGatewayInstanceResult call() throws Exception { UpdateGatewayInstanceResult result = null; try { result = executeUpdateGatewayInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Shuts down the client, releasing all managed resources. This includes forcibly terminating all pending * asynchronous service calls. Clients who wish to give pending asynchronous service calls time to complete should * call {@code getExecutorService().shutdown()} followed by {@code getExecutorService().awaitTermination()} prior to * calling this method. */ @Override public void shutdown() { super.shutdown(); executorService.shutdownNow(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy