예제 #1
0
  @Override
  public java.util.concurrent.Future<ListAliasesResult> listAliasesAsync(
      final ListAliasesRequest request,
      final com.amazonaws.handlers.AsyncHandler<ListAliasesRequest, ListAliasesResult>
          asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<ListAliasesResult>() {
          @Override
          public ListAliasesResult call() throws Exception {
            ListAliasesResult result;

            try {
              result = listAliases(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
예제 #2
0
  @Override
  public java.util.concurrent.Future<Void> enableKeyRotationAsync(
      final EnableKeyRotationRequest request,
      final com.amazonaws.handlers.AsyncHandler<EnableKeyRotationRequest, Void> asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<Void>() {
          @Override
          public Void call() throws Exception {
            Void result;

            try {
              enableKeyRotation(request);
              result = null;
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
예제 #3
0
  @Override
  public java.util.concurrent.Future<GenerateRandomResult> generateRandomAsync(
      final GenerateRandomRequest request,
      final com.amazonaws.handlers.AsyncHandler<GenerateRandomRequest, GenerateRandomResult>
          asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<GenerateRandomResult>() {
          @Override
          public GenerateRandomResult call() throws Exception {
            GenerateRandomResult result;

            try {
              result = generateRandom(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
예제 #4
0
  @Override
  public java.util.concurrent.Future<CancelKeyDeletionResult> cancelKeyDeletionAsync(
      final CancelKeyDeletionRequest request,
      final com.amazonaws.handlers.AsyncHandler<CancelKeyDeletionRequest, CancelKeyDeletionResult>
          asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<CancelKeyDeletionResult>() {
          @Override
          public CancelKeyDeletionResult call() throws Exception {
            CancelKeyDeletionResult result;

            try {
              result = cancelKeyDeletion(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }