aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.cds/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-07-02 09:30:52 -0400
committerJim Hahn <jrh3@att.com>2020-07-02 12:49:44 -0400
commitc6012167b9692eb38bcb479f233543e93c51c998 (patch)
tree7a2a590eb659cd036f8815de9ce894e6099cf92b /models-interactions/model-actors/actor.cds/src
parente7ba97a66db5c0a45626aff62f9a167f88da62c1 (diff)
Rename XxxActorServiceProvider to XxxActor
Renamed the actors and their test classes. Addressed review comments: - some license dates Issue-ID: POLICY-2684 Change-Id: Ic9d83e146ef36bb305496d541166cb9f80544025 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.cds/src')
-rw-r--r--models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActor.java (renamed from models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java)6
-rw-r--r--models-interactions/model-actors/actor.cds/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorTest.java (renamed from models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProviderTest.java)14
3 files changed, 11 insertions, 11 deletions
diff --git a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActor.java
index 45ef34495..d630d18ae 100644
--- a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActor.java
@@ -58,15 +58,15 @@ import org.slf4j.LoggerFactory;
* CDS is an unusual actor in that it uses a single, generic operator to initiate all
* operation types. The action taken is always the same, only the operation name changes.
*/
-public class CdsActorServiceProvider extends ActorImpl {
+public class CdsActor extends ActorImpl {
public static final String NAME = CdsActorConstants.CDS_ACTOR;
- private static final Logger LOGGER = LoggerFactory.getLogger(CdsActorServiceProvider.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(CdsActor.class);
/**
* Constructs the object.
*/
- public CdsActorServiceProvider() {
+ public CdsActor() {
super(CdsActorConstants.CDS_ACTOR);
addOperator(new GrpcOperator(CdsActorConstants.CDS_ACTOR, GrpcOperation.NAME, GrpcOperation::new));
diff --git a/models-interactions/model-actors/actor.cds/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actor.cds/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index e91d41989..69d1780bc 100644
--- a/models-interactions/model-actors/actor.cds/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/models-interactions/model-actors/actor.cds/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actor.cds.CdsActorServiceProvider
+org.onap.policy.controlloop.actor.cds.CdsActor
diff --git a/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProviderTest.java b/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorTest.java
index 73787da3f..706f170fb 100644
--- a/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorTest.java
@@ -55,13 +55,13 @@ import org.onap.policy.cds.client.CdsProcessorGrpcClient;
import org.onap.policy.cds.properties.CdsServerProperties;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
-import org.onap.policy.controlloop.actor.cds.CdsActorServiceProvider.CdsActorServiceManager;
+import org.onap.policy.controlloop.actor.cds.CdsActor.CdsActorServiceManager;
import org.onap.policy.controlloop.actor.cds.constants.CdsActorConstants;
import org.onap.policy.controlloop.actor.test.BasicActor;
import org.onap.policy.controlloop.actorserviceprovider.Operator;
import org.onap.policy.controlloop.policy.Policy;
-public class CdsActorServiceProviderTest extends BasicActor {
+public class CdsActorTest extends BasicActor {
private static final String CDS_BLUEPRINT_NAME = "vfw-cds";
private static final String CDS_BLUEPRINT_VERSION = "1.0.0";
@@ -71,7 +71,7 @@ public class CdsActorServiceProviderTest extends BasicActor {
@Mock
private CdsProcessorGrpcClient cdsClient;
- private CdsActorServiceProvider cdsActor;
+ private CdsActor cdsActor;
private Policy policy;
private CdsServerProperties cdsProps;
private Map<String, String> aaiParams;
@@ -114,7 +114,7 @@ public class CdsActorServiceProviderTest extends BasicActor {
when(cdsClient.sendRequest(any(ExecutionServiceInput.class))).thenReturn(mock(CountDownLatch.class));
// Setup the cdsActor
- cdsActor = new CdsActorServiceProvider();
+ cdsActor = new CdsActor();
// Setup onset event
onset = new VirtualControlLoopEvent();
@@ -138,7 +138,7 @@ public class CdsActorServiceProviderTest extends BasicActor {
@Test
public void testGetOperator() {
- CdsActorServiceProvider sp = new CdsActorServiceProvider();
+ CdsActor sp = new CdsActor();
// should always return the same operator regardless of the name
Operator oper = sp.getOperator("unknown");
@@ -206,7 +206,7 @@ public class CdsActorServiceProviderTest extends BasicActor {
any(TimeUnit.class));
when(cdsClient.sendRequest(any(ExecutionServiceInput.class))).thenReturn(countDownLatch);
- CdsActorServiceProvider.CdsActorServiceManager cdsActorSvcMgr = cdsActor.new CdsActorServiceManager();
+ CdsActor.CdsActorServiceManager cdsActorSvcMgr = cdsActor.new CdsActorServiceManager();
CdsResponse response =
cdsActorSvcMgr.sendRequestToCds(cdsClient, cdsProps, ExecutionServiceInput.newBuilder().build());
assertTrue(Thread.interrupted());
@@ -216,7 +216,7 @@ public class CdsActorServiceProviderTest extends BasicActor {
@Test
public void testSendRequestToCdsLatchTimedOut() {
- CdsActorServiceProvider.CdsActorServiceManager cdsActorSvcMgr = cdsActor.new CdsActorServiceManager();
+ CdsActor.CdsActorServiceManager cdsActorSvcMgr = cdsActor.new CdsActorServiceManager();
CdsResponse response =
cdsActorSvcMgr.sendRequestToCds(cdsClient, cdsProps, ExecutionServiceInput.newBuilder().build());
assertNotNull(response);