summaryrefslogtreecommitdiffstats
path: root/catalog-fe/src/main/java
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2018-02-13 10:38:16 +0200
committerIdan Amit <ia096e@intl.att.com>2018-02-13 16:43:30 +0200
commit71904f241cd3047054dc0a36c04120a3f53205ae (patch)
tree4bc2a7de56d7737131ddab4f2d206a655dbc0d6d /catalog-fe/src/main/java
parent332f0679fbd23532a058f0ff6a7cffaed3b5424e (diff)
Plugin pubsub implementation
Added implementation for sdc-hub and plugin pubsub classes Added timeout in the plugin head request health check Passing parentUrl in query params to each plugin Change-Id: Ie94aa4b398dd2fcfdf2d134f6c5785d3aa50d237 Issue-ID: SDC-1007 Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'catalog-fe/src/main/java')
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java
index a369d661fc..563dc22507 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java
@@ -4,6 +4,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpHead;
import org.apache.http.impl.client.CloseableHttpClient;
@@ -60,6 +61,12 @@ public class PluginStatusBL {
boolean result = false;
HttpHead head = new HttpHead(plugin.getPluginDiscoveryUrl());
+ RequestConfig requestConfig = RequestConfig.custom()
+ .setSocketTimeout(1000)
+ .setConnectTimeout(1000)
+ .setConnectionRequestTimeout(1000).build();
+
+ head.setConfig(requestConfig);
try (CloseableHttpResponse response = this.client.execute(head)) {
result = response != null && response.getStatusLine().getStatusCode() == 200;