aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-dcae/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'participant/participant-impl/participant-impl-dcae/src/main')
-rw-r--r--participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/DcaeParticipantApplication.java6
-rw-r--r--participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/AbstractHttpClient.java12
-rw-r--r--participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/ClampHttpClient.java2
-rw-r--r--participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/ConsulDcaeHttpClient.java3
-rw-r--r--participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/handler/ControlLoopElementHandler.java3
5 files changed, 19 insertions, 7 deletions
diff --git a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/DcaeParticipantApplication.java b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/DcaeParticipantApplication.java
index 25edaf552..9be83bbd3 100644
--- a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/DcaeParticipantApplication.java
+++ b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/DcaeParticipantApplication.java
@@ -30,8 +30,10 @@ import org.springframework.context.annotation.ComponentScan;
*
*/
@SpringBootApplication
-@ComponentScan({"org.onap.policy.clamp.controlloop.participant.dcae",
- "org.onap.policy.clamp.controlloop.participant.intermediary"})
+@ComponentScan({
+ "org.onap.policy.clamp.controlloop.participant.dcae",
+ "org.onap.policy.clamp.controlloop.participant.intermediary"
+})
@ConfigurationPropertiesScan("org.onap.policy.clamp.controlloop.participant.dcae.main.parameters")
public class DcaeParticipantApplication {
diff --git a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/AbstractHttpClient.java b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/AbstractHttpClient.java
index e23aaaf23..43326e725 100644
--- a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/AbstractHttpClient.java
+++ b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/AbstractHttpClient.java
@@ -24,7 +24,6 @@ import java.io.Closeable;
import java.io.IOException;
import java.util.Collections;
import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.onap.policy.clamp.controlloop.common.exception.ControlLoopRuntimeException;
import org.onap.policy.clamp.controlloop.participant.dcae.model.Loop;
@@ -46,6 +45,9 @@ public abstract class AbstractHttpClient implements Closeable {
/**
* Constructor.
+ *
+ * @param restClientParameters the REST client parameters
+ * @throws ControlLoopRuntimeException on errors
*/
protected AbstractHttpClient(BusTopicParams restClientParameters) {
try {
@@ -58,7 +60,7 @@ public abstract class AbstractHttpClient implements Closeable {
protected boolean executePut(String path, String jsonEntity, int statusCode) {
try {
- Response response = httpclient.put(path, Entity.json(jsonEntity), Collections.emptyMap());
+ var response = httpclient.put(path, Entity.json(jsonEntity), Collections.emptyMap());
return response.getStatus() == statusCode;
} catch (Exception e) {
LOGGER.error(MSG_REQUEST_FAILED, httpclient.getName(), e);
@@ -68,7 +70,7 @@ public abstract class AbstractHttpClient implements Closeable {
protected boolean executePut(String path, int statusCode) {
try {
- Response response = httpclient.put(path, Entity.json(""), Collections.emptyMap());
+ var response = httpclient.put(path, Entity.json(""), Collections.emptyMap());
return response.getStatus() == statusCode;
} catch (Exception e) {
LOGGER.error(MSG_REQUEST_FAILED, httpclient.getName(), e);
@@ -78,7 +80,7 @@ public abstract class AbstractHttpClient implements Closeable {
protected Loop executePost(String path, int statusCode) {
try {
- Response response = httpclient.post(path, Entity.json(""), Collections.emptyMap());
+ var response = httpclient.post(path, Entity.json(""), Collections.emptyMap());
if (response.getStatus() != statusCode) {
return null;
}
@@ -91,7 +93,7 @@ public abstract class AbstractHttpClient implements Closeable {
protected Loop executeGet(String path, int statusCode) {
try {
- Response response = httpclient.get(path);
+ var response = httpclient.get(path);
if (response.getStatus() != statusCode) {
return null;
diff --git a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/ClampHttpClient.java b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/ClampHttpClient.java
index e928c138f..fd19d9d3a 100644
--- a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/ClampHttpClient.java
+++ b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/ClampHttpClient.java
@@ -40,6 +40,8 @@ public class ClampHttpClient extends AbstractHttpClient {
/**
* Constructor.
+ *
+ * @param parameters the DCAE parameters
*/
public ClampHttpClient(ParticipantDcaeParameters parameters) {
super(parameters.getClampClientParameters());
diff --git a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/ConsulDcaeHttpClient.java b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/ConsulDcaeHttpClient.java
index 4f76e3025..154dd09be 100644
--- a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/ConsulDcaeHttpClient.java
+++ b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/httpclient/ConsulDcaeHttpClient.java
@@ -31,6 +31,8 @@ public class ConsulDcaeHttpClient extends AbstractHttpClient {
/**
* Constructor.
+ *
+ * @param parameters the DCAE parameters
*/
public ConsulDcaeHttpClient(ParticipantDcaeParameters parameters) {
super(parameters.getConsulClientParameters());
@@ -39,6 +41,7 @@ public class ConsulDcaeHttpClient extends AbstractHttpClient {
/**
* Call consult.
*
+ * @param name the name to deploy
* @param jsonEntity the Entity
* @return true
*/
diff --git a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/handler/ControlLoopElementHandler.java b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/handler/ControlLoopElementHandler.java
index 76ed1122c..6c5ff1d78 100644
--- a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/handler/ControlLoopElementHandler.java
+++ b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/handler/ControlLoopElementHandler.java
@@ -74,6 +74,9 @@ public class ControlLoopElementHandler implements ControlLoopElementListener {
/**
* Constructor.
+ *
+ * @param clampClient the CLAMP client
+ * @param consulClient the Consul client
*/
public ControlLoopElementHandler(ClampHttpClient clampClient, ConsulDcaeHttpClient consulClient) {
this.clampClient = clampClient;