diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java b/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java index 667634044b99bbd02562afff97a2dd1457eef787..558bc04803803178ebd15cd7afa30334c3f62c1d 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java @@ -55,7 +55,7 @@ public class PubsubEndpoint { HttpResponse response = notificationHandler.notifySubscriber(notificationId, pubsubMessage, headerAttributes); if (!response.isSuccessCode()) { this.log.error(NOT_ACKNOWLEDGE); - return new ResponseEntity<String>(NOT_ACKNOWLEDGE, HttpStatus.INTERNAL_SERVER_ERROR); + return new ResponseEntity<String>(NOT_ACKNOWLEDGE, HttpStatus.valueOf(response.getResponseCode())); } this.log.info(ACKNOWLEDGE); return new ResponseEntity<String>(ACKNOWLEDGE, HttpStatus.OK); diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/auth/GsaAuth.java b/notification-core/src/main/java/org/opengroup/osdu/notification/auth/GsaAuth.java index 0cd7c7c51c0d3c51381c5795502a67e320c36917..38618efa2739d17c3ce1825c2b92fe797ba740e8 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/auth/GsaAuth.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/auth/GsaAuth.java @@ -35,22 +35,18 @@ public class GsaAuth implements SecretAuth { private GsaSecret gsaSecret; - @Override public void setSecret(Secret secret) { this.gsaSecret = (GsaSecret) secret; } - @Override public Secret getSecret() { return this.gsaSecret; } - @Override public String getPushUrl(String endpoint) throws Exception { return endpoint; } - @Override public Map<String, String> getRequestHeaders() { Map<String, String> requestHeader = new HashMap<>(); if (gsaSecret != null) { diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/auth/HmacAuth.java b/notification-core/src/main/java/org/opengroup/osdu/notification/auth/HmacAuth.java index 0973b14debafc93a0cb2debc8746110487d849c8..6eeaf1eda9f38c70ab31437d5197204345ccb9e0 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/auth/HmacAuth.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/auth/HmacAuth.java @@ -32,17 +32,14 @@ public class HmacAuth implements SecretAuth { private HmacSecret hmacSecret; - @Override public void setSecret(Secret secret) { this.hmacSecret = (HmacSecret) secret; } - @Override public Secret getSecret() { return this.hmacSecret; } - @Override public String getPushUrl(String endpoint) throws Exception { String pushUrl = endpoint; try { @@ -54,7 +51,6 @@ public class HmacAuth implements SecretAuth { return pushUrl; } - @Override public Map<String, String> getRequestHeaders() { Map<String, String> requestHeader = new HashMap<>(); return requestHeader; diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/service/NotificationHandler.java b/notification-core/src/main/java/org/opengroup/osdu/notification/service/NotificationHandler.java index ed8ff039b53be33f59495623bc314ae25fa547ea..124af890e00463f91aeee1d04706b1c351c50bcc 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/service/NotificationHandler.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/service/NotificationHandler.java @@ -41,7 +41,7 @@ public class NotificationHandler { private SubscriptionHandler subscriptionHandler; @Autowired private AuthFactory authFactory; - @Value("${app.expireTime:30000}") + @Value("${app.waitingTime:30000}") private int WAITING_TIME ; public HttpResponse notifySubscriber(String notificationId, String pubsubMessage, Map<String, String> headerAttributes) throws Exception {