Simplified method form for invoking the UpdateApplication operation with an AsyncHandler.

@see #updateApplicationAsync(UpdateApplicationRequest, com.amazonaws.handlers.AsyncHandler)
500224
@Override
    public java.util.concurrent.Future<UpdateApplicationResult> updateApplicationAsync(
            com.amazonaws.handlers.AsyncHandler<UpdateApplicationRequest, UpdateApplicationResult> asyncHandler) {

        return updateApplicationAsync(new UpdateApplicationRequest(), asyncHandler);
    }
255875
@Override
    public java.util.concurrent.Future<DescribeEventSubscriptionsResult> describeEventSubscriptionsAsync(
            com.amazonaws.handlers.AsyncHandler<DescribeEventSubscriptionsRequest, DescribeEventSubscriptionsResult> asyncHandler) {

        return describeEventSubscriptionsAsync(new DescribeEventSubscriptionsRequest(), asyncHandler);
    }
967349
@Override
    public java.util.concurrent.Future<UpdateTableResult> updateTableAsync(String tableName, ProvisionedThroughput provisionedThroughput,
            com.amazonaws.handlers.AsyncHandler<UpdateTableRequest, UpdateTableResult> asyncHandler) {

        return updateTableAsync(new UpdateTableRequest().withTableName(tableName).withProvisionedThroughput(provisionedThroughput), asyncHandler);
    }
655856
@Override
    public java.util.concurrent.Future<DescribeReservedInstancesListingsResult> describeReservedInstancesListingsAsync(
            com.amazonaws.handlers.AsyncHandler<DescribeReservedInstancesListingsRequest, DescribeReservedInstancesListingsResult> asyncHandler) {

        return describeReservedInstancesListingsAsync(new DescribeReservedInstancesListingsRequest(), asyncHandler);
    }
1284770
public final void batchUpdateWidget(final Runnable action) {
        _batchUpdateCounter++;
        try {
            action.run();
        } catch (final RuntimeException e) {
            logger.error("Exception occurred in widget batch update, fireValueChanged() will not be invoked", e);
            throw e;
        } finally {
            _batchUpdateCounter--;
        }
        if (_batchUpdateCounter == 0) {
            onBatchFinished();
        }
    }
673167
@FFDCIgnore(value = UnableToAdaptException.class)
    public void addApplication(ApplicationInstallInfo installInfo) {
        // ...and now create the new... start by asking the handler what needs monitoring
        final Collection<Notification> notificationsToMonitor;
        final boolean listenForRootStructuralChanges;
        ApplicationMonitoringInformation ami = installInfo.getApplicationMonitoringInformation();
        if (ami != null) {
            notificationsToMonitor = ami.getNotificationsToMonitor();
            listenForRootStructuralChanges = ami.isListeningForRootStructuralChanges();
        } else {
            notificationsToMonitor = null;
            listenForRootStructuralChanges = true;
        }

        try {
            // Now create the listeners for these notifications
            ApplicationListeners listeners = new ApplicationListeners(installInfo.getUpdateHandler(), _executorService);

            /*
             * Go through all of the notifications to monitor and create a listener for it. Note we also always create a different type of listener for root so if the app is
             * deleted we
             * know about it. Optionally (based on the handler) this might also monitor for files being added or removed from the root to trigger an update, i.e. if a WAR gets
             * added to
             * the root of an EAR.
             */
            if (notificationsToMonitor != null) {
                for (Notification notificationToMonitor : notificationsToMonitor) {
                    ApplicationListener listener = new ApplicationListener(notificationToMonitor, listeners, installInfo);
                    listeners.addListener(listener);
                }

                // If the handler did request monitoring then we still need a non-recursive handler to check root
                listeners.addListener(new RootApplicationListener(installInfo.getContainer(), listenForRootStructuralChanges, listeners));
            } else {
                /*
                 * If the handler didn't give us any information about what to monitor then monitor the whole application, note we use another type of listener again here that will
                 * monitor for root deletions or updates to any part of the application
                 */
                listeners.addListener(new CompleteApplicationListener(installInfo.getContainer(), listeners));
            }

            ApplicationListeners old = _appListeners.put(installInfo.getPid(), listeners);

            if (old != null) {
                old.stopListeners(true);
            }

            // If we're actively scanning, start the new listener
            ApplicationMonitorConfig config = _config.get();
            if (config.getUpdateTrigger() != UpdateTrigger.DISABLED) {
                listeners.startListeners(config.getPollingRate(), config.getUpdateTrigger() == UpdateTrigger.MBEAN);
            }
        } catch (UnableToAdaptException e) {
            // Ignore, we just won't monitor this application but do put out a warning message
            AppMessageHelper.get(installInfo.getHandler()).warning("APPLICATION_MONITORING_FAIL", installInfo.getName());
        }
    }
1323516
@Override
    public java.util.concurrent.Future<SetTopicAttributesResult> setTopicAttributesAsync(String topicArn, String attributeName, String attributeValue,
            com.amazonaws.handlers.AsyncHandler<SetTopicAttributesRequest, SetTopicAttributesResult> asyncHandler) {

        return setTopicAttributesAsync(
                new SetTopicAttributesRequest().withTopicArn(topicArn).withAttributeName(attributeName).withAttributeValue(attributeValue), asyncHandler);
    }
703033
@Override
    public java.util.concurrent.Future<DescribeConversionTasksResult> describeConversionTasksAsync(
            com.amazonaws.handlers.AsyncHandler<DescribeConversionTasksRequest, DescribeConversionTasksResult> asyncHandler) {

        return describeConversionTasksAsync(new DescribeConversionTasksRequest(), asyncHandler);
    }
1126113
private <T> Observable<PollingState<T>> updateStateFromAzureAsyncOperationHeaderOnPutAsync(final PollingState<T> pollingState) {
        return pollAsync(pollingState.azureAsyncOperationHeaderLink(), pollingState.loggingContext())
                .flatMap(new Func1<Response<ResponseBody>, Observable<PollingState<T>>>() {
                    @Override
                    public Observable<PollingState<T>> call(Response<ResponseBody> response) {
                        final AzureAsyncOperation asyncOperation;
                        try {
                            asyncOperation = AzureAsyncOperation.fromResponse(restClient().serializerAdapter(), response);
                        } catch (CloudException exception) {
                            return Observable.error(exception);
                        }
                        pollingState.withStatus(asyncOperation.status());
                        pollingState.withErrorBody(asyncOperation.getError());
                        pollingState.withResponse(response);
                        pollingState.withResource(null);
                        return Observable.just(pollingState);
                    }
                });
    }
1086070
public void submitApplication(final ApplicationSubmission applicationSubmission) throws IOException {
    final String url = "ws/v1/cluster/apps";
    final HttpPost post = preparePost(url);

    final StringWriter writer = new StringWriter();
    try {
      this.objectMapper.writeValue(writer, applicationSubmission);
    } catch (final IOException e) {
      throw new RuntimeException(e);
    }
    final String message = writer.toString();
    LOG.log(Level.FINE, "Sending:\n{0}", message.replace("\n", "\n\t"));
    post.setEntity(new StringEntity(message, ContentType.APPLICATION_JSON));

    try (final CloseableHttpResponse response = this.httpClient.execute(post, this.httpClientContext)) {
      final String responseMessage = IOUtils.toString(response.getEntity().getContent());
      LOG.log(Level.FINE, "Response: {0}", responseMessage.replace("\n", "\n\t"));
    }
  }
1179598
public void awaitApplicationReadinessOrFail(final String applicationName) {
        await().atMost(5, TimeUnit.MINUTES).until(() -> {
                return client
                    .replicationControllers()
                    .inNamespace(this.namespace)
                    .withName(applicationName).isReady();
            }
        );
    }
529810
@Override
    public java.util.concurrent.Future<DescribeSeverityLevelsResult> describeSeverityLevelsAsync(
            com.amazonaws.handlers.AsyncHandler<DescribeSeverityLevelsRequest, DescribeSeverityLevelsResult> asyncHandler) {

        return describeSeverityLevelsAsync(new DescribeSeverityLevelsRequest(), asyncHandler);
    }
1001622
public void addApplication(Application app) {
        appNameApplicationMap.put(app.getName().toUpperCase(Locale.ROOT), app);
        addInstancesToVIPMaps(app, this.virtualHostNameAppMap, this.secureVirtualHostNameAppMap);
        applications.add(app);
    }
134064
@Override
    public java.util.concurrent.Future<ChangeMessageVisibilityResult> changeMessageVisibilityAsync(String queueUrl, String receiptHandle,
            Integer visibilityTimeout, com.amazonaws.handlers.AsyncHandler<ChangeMessageVisibilityRequest, ChangeMessageVisibilityResult> asyncHandler) {

        return changeMessageVisibilityAsync(
                new ChangeMessageVisibilityRequest().withQueueUrl(queueUrl).withReceiptHandle(receiptHandle).withVisibilityTimeout(visibilityTimeout),
                asyncHandler);
    }
391333
@Override
    public java.util.concurrent.Future<UpdateTableResult> updateTableAsync(String tableName, ProvisionedThroughput provisionedThroughput) {

        return updateTableAsync(new UpdateTableRequest().withTableName(tableName).withProvisionedThroughput(provisionedThroughput));
    }
600126
@Override
    public java.util.concurrent.Future<SubmitContainerStateChangeResult> submitContainerStateChangeAsync(
            com.amazonaws.handlers.AsyncHandler<SubmitContainerStateChangeRequest, SubmitContainerStateChangeResult> asyncHandler) {

        return submitContainerStateChangeAsync(new SubmitContainerStateChangeRequest(), asyncHandler);
    }
1000302
@Override
    public ApiResponse handleApplicationException(ApiFailureResource resource, RuntimeException cause) {
        final FaicliUnifiedFailureType failureType = FaicliUnifiedFailureType.BUSINESS_ERROR;
        final FaicliUnifiedFailureResult result = createFailureResult(failureType, resource, cause);
        return asJson(result).httpStatus(prepareBusinessFailureStatus());
    }