Upgrade dependencies; fix for compatibility
This commit is contained in:
@@ -49,15 +49,16 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||
* The {@link HttpRequestHandlingMessagingGateway} extension for the Amazon WS SNS HTTP(S) endpoints.
|
||||
* Accepts all {@code x-amz-sns-message-type}s, converts the received Topic JSON message to the
|
||||
* {@link Map} using {@link MappingJackson2HttpMessageConverter} and send it to the provided
|
||||
* {@link #requestChannel} as {@link Message} {@code payload}.
|
||||
* {@link #getRequestChannel()} as {@link Message} {@code payload}.
|
||||
* <p>
|
||||
* The mapped url must be configured inside the Amazon Web Service platform as a subscription.
|
||||
* Before receiving any notification itself this HTTP endpoint must confirm the subscription.
|
||||
* <p>
|
||||
* The {@link #handleNotificationStatus} flag (defaults to {@code false}) indicates that
|
||||
* this endpoint should send the {@code SubscriptionConfirmation/UnsubscribeConfirmation}
|
||||
* messages to the the provided {@link #requestChannel}. If that, the {@link AwsHeaders#NOTIFICATION_STATUS}
|
||||
* header is populated with the {@link NotificationStatus} value. In that case it is a responsibility of
|
||||
* messages to the the provided {@link #getRequestChannel()}.
|
||||
* If that, the {@link AwsHeaders#NOTIFICATION_STATUS} header is populated
|
||||
* with the {@link NotificationStatus} value. In that case it is a responsibility of
|
||||
* the application to {@link NotificationStatus#confirmSubscription()} or not.
|
||||
* <p>
|
||||
* By default this endpoint just does {@link NotificationStatus#confirmSubscription()}
|
||||
@@ -106,7 +107,7 @@ public class SnsInboundChannelAdapter extends HttpRequestHandlingMessagingGatewa
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInit() throws Exception {
|
||||
protected void onInit() {
|
||||
super.onInit();
|
||||
if (this.payloadExpression != null) {
|
||||
this.evaluationContext = createEvaluationContext();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017-2018 the original author or authors.
|
||||
* Copyright 2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017-2018 the original author or authors.
|
||||
* Copyright 2017-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -167,7 +167,7 @@ public abstract class AbstractAwsMessageHandler<H> extends AbstractMessageProduc
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInit() throws Exception {
|
||||
protected void onInit() {
|
||||
super.onInit();
|
||||
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017-2018 the original author or authors.
|
||||
* Copyright 2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -188,9 +188,13 @@ public class KplMessageHandler extends AbstractAwsMessageHandler<Void> {
|
||||
final AsyncHandler<PutRecordRequest, UserRecordResult> asyncHandler =
|
||||
obtainAsyncHandler(message, putRecordRequest);
|
||||
final FutureCallback<UserRecordResult> callback = new FutureCallback<UserRecordResult>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
asyncHandler.onError((t instanceof Exception) ? ((Exception) t) : new AwsRequestFailureException(message, putRecordRequest, t));
|
||||
public void onFailure(Throwable ex) {
|
||||
asyncHandler
|
||||
.onError(ex instanceof Exception ?
|
||||
(Exception) ex :
|
||||
new AwsRequestFailureException(message, putRecordRequest, ex));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2018 the original author or authors.
|
||||
* Copyright 2016-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -61,7 +61,7 @@ import com.amazonaws.services.sns.model.PublishResult;
|
||||
* the SNS Message is built from there and the {@code messageStructure}
|
||||
* of the {@link PublishRequest} is set to {@code json}.
|
||||
* For the convenience the package {@code org.springframework.integration.aws.support} is imported
|
||||
* to the {@link #evaluationContext} to allow bypass it for the {@link SnsBodyBuilder}
|
||||
* to the {@link #getEvaluationContext()} to allow bypass it for the {@link SnsBodyBuilder}
|
||||
* from the {@link #bodyExpression} definition. For example:
|
||||
* <pre class="code">
|
||||
* {@code
|
||||
@@ -143,7 +143,7 @@ public class SnsMessageHandler extends AbstractAwsMessageHandler<Map<String, Mes
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInit() throws Exception {
|
||||
protected void onInit() {
|
||||
super.onInit();
|
||||
TypeLocator typeLocator = getEvaluationContext().getTypeLocator();
|
||||
if (typeLocator instanceof StandardTypeLocator) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2018 the original author or authors.
|
||||
* Copyright 2016-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -150,7 +150,7 @@ public class SqsMessageHandler extends AbstractAwsMessageHandler<Map<String, Mes
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInit() throws Exception {
|
||||
protected void onInit() {
|
||||
super.onInit();
|
||||
|
||||
if (this.messageConverter == null) {
|
||||
|
||||
Reference in New Issue
Block a user