summaryrefslogtreecommitdiffstats
path: root/models-sim/models-sim-dmaap/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-06-17 16:29:33 -0400
committerAjith Sreekumar <ajith.sreekumar@bell.ca>2021-06-21 09:22:35 +0000
commitbf430888dbb1c514d10e5cc3fd25496712a86730 (patch)
treeba9288d233aaf74a29a8e634089e586fc16aae93 /models-sim/models-sim-dmaap/src
parent1ada3a6368f340df653886c4229b192ce7a5fc35 (diff)
Use lombok for errors pap, pdp, sim-dmaap, sim-pdp
Issue-ID: POLICY-3396 Change-Id: Ib2c9bc5dc199e15ae9ca077031c0f2cfbc5b6a81 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-sim/models-sim-dmaap/src')
-rw-r--r--models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java b/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java
index e136509c9..9c368e044 100644
--- a/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java
+++ b/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java
@@ -22,6 +22,7 @@
package org.onap.policy.models.sim.dmaap.startstop;
import java.util.Arrays;
+import lombok.Getter;
import org.onap.policy.common.utils.cmd.CommandLineException;
import org.onap.policy.models.sim.dmaap.DmaapSimException;
import org.onap.policy.models.sim.dmaap.DmaapSimRuntimeException;
@@ -38,7 +39,8 @@ public class Main {
private static final Logger LOGGER = LoggerFactory.getLogger(Main.class);
private DmaapSimActivator activator;
- private DmaapSimParameterGroup parameterGroup;
+ @Getter
+ private DmaapSimParameterGroup parameters;
/**
* Instantiates the DMaap Simulator service.
@@ -67,14 +69,14 @@ public class Main {
// Read the parameters
try {
- parameterGroup = new DmaapSimParameterHandler().getParameters(arguments);
+ parameters = new DmaapSimParameterHandler().getParameters(arguments);
} catch (final Exception e) {
LOGGER.error("start of DMaaP simulator service failed", e);
return;
}
// Now, create the activator for the DMaaP Simulator service
- activator = new DmaapSimActivator(parameterGroup);
+ activator = new DmaapSimActivator(parameters);
// Start the activator
try {
@@ -90,22 +92,13 @@ public class Main {
}
/**
- * Get the parameters specified in JSON.
- *
- * @return the parameters
- */
- public DmaapSimParameterGroup getParameters() {
- return parameterGroup;
- }
-
- /**
* Shut down Execution.
*
* @throws DmaapSimException on shutdown errors
*/
public void shutdown() throws DmaapSimException {
// clear the parameterGroup variable
- parameterGroup = null;
+ parameters = null;
// clear the DMaaP simulator activator
if (activator != null && activator.isAlive()) {