summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/cds
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-impl/cds')
-rw-r--r--models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/CdsResponse.java9
-rw-r--r--models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/BasicAuthClientHeaderInterceptor.java8
-rw-r--r--models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorHandler.java7
3 files changed, 6 insertions, 18 deletions
diff --git a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/CdsResponse.java b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/CdsResponse.java
index fd12fbf44..411dff94e 100644
--- a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/CdsResponse.java
+++ b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/CdsResponse.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Bell Canada.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,12 +35,4 @@ public class CdsResponse implements Serializable {
private String requestId;
private String status;
-
- /**
- * Default empty constructor.
- */
- public CdsResponse() {
- super();
- }
-
}
diff --git a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/BasicAuthClientHeaderInterceptor.java b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/BasicAuthClientHeaderInterceptor.java
index 17eefd227..bd6af797c 100644
--- a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/BasicAuthClientHeaderInterceptor.java
+++ b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/BasicAuthClientHeaderInterceptor.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Bell Canada.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import io.grpc.ForwardingClientCall;
import io.grpc.Metadata;
import io.grpc.Metadata.Key;
import io.grpc.MethodDescriptor;
+import lombok.AllArgsConstructor;
import org.onap.policy.cds.properties.CdsServerProperties;
/**
@@ -40,15 +41,12 @@ import org.onap.policy.cds.properties.CdsServerProperties;
* On the server side, CDS BasicAuthServerInterceptor (1) gets the client metadata from the server context, (2) extract
* the "Authorization" header key and finally (3) decodes the username and password from the authHeader.</p>
*/
+@AllArgsConstructor
public class BasicAuthClientHeaderInterceptor implements ClientInterceptor {
static final String BASIC_AUTH_HEADER_KEY = "Authorization";
private CdsServerProperties props;
- BasicAuthClientHeaderInterceptor(CdsServerProperties props) {
- this.props = props;
- }
-
@Override
public <Q, P> ClientCall<Q, P> interceptCall(MethodDescriptor<Q, P> method,
CallOptions callOptions, Channel channel) {
diff --git a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorHandler.java b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorHandler.java
index bb7a038db..6c4d6caab 100644
--- a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorHandler.java
+++ b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorHandler.java
@@ -22,6 +22,7 @@ package org.onap.policy.cds.client;
import io.grpc.ManagedChannel;
import io.grpc.stub.StreamObserver;
import java.util.concurrent.CountDownLatch;
+import lombok.AllArgsConstructor;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc.BluePrintProcessingServiceStub;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput;
@@ -33,6 +34,7 @@ import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@AllArgsConstructor
public class CdsProcessorHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(CdsProcessorHandler.class);
private static final String LOG_MSG = "[{}|{}|{}|]{}{}";
@@ -40,11 +42,6 @@ public class CdsProcessorHandler {
private CdsProcessorListener listener;
private String url;
- CdsProcessorHandler(final CdsProcessorListener listener, String url) {
- this.listener = listener;
- this.url = url;
- }
-
CountDownLatch process(ExecutionServiceInput request, ManagedChannel channel) {
final var header = request.getActionIdentifiers();
LOGGER.info("Processing blueprint({}:{}) for action({})", header.getBlueprintVersion(),