aboutsummaryrefslogtreecommitdiffstats
path: root/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorService.java
diff options
context:
space:
mode:
Diffstat (limited to 'pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorService.java')
-rw-r--r--pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorService.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorService.java b/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorService.java
index e5576b8..218dbc8 100644
--- a/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorService.java
+++ b/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorService.java
@@ -29,6 +29,7 @@ import org.onap.pnfsimulator.rest.model.SimulatorParams;
import org.onap.pnfsimulator.rest.model.SimulatorRequest;
import org.onap.pnfsimulator.simulator.client.HttpClientAdapter;
import org.onap.pnfsimulator.simulator.client.HttpClientAdapterImpl;
+import org.onap.pnfsimulator.simulator.client.HttpResponseAdapter;
import org.onap.pnfsimulator.simulator.client.utils.ssl.SslAuthenticationHelper;
import org.onap.pnfsimulator.simulator.scheduler.EventScheduler;
import org.onap.pnfsimulator.simulatorconfig.SimulatorConfig;
@@ -93,14 +94,14 @@ public class SimulatorService {
patchedJsonWithVariablesSubstituted);
}
- public void triggerOneTimeEvent(FullEvent event) throws IOException, GeneralSecurityException {
+ public HttpResponseAdapter triggerOneTimeEvent(FullEvent event) throws IOException, GeneralSecurityException {
KeywordsHandler keywordsHandler = new KeywordsHandler(new KeywordsExtractor(), id -> 1);
JsonObject withKeywordsSubstituted = keywordsHandler.substituteKeywords(event.getEvent(), "").getAsJsonObject();
HttpClientAdapter client = createHttpClientAdapter(event.getVesServerUrl());
eventDataService.persistEventData(EMPTY_JSON_OBJECT, withKeywordsSubstituted, event.getEvent(), EMPTY_JSON_OBJECT);
- client.send(withKeywordsSubstituted.toString());
+ return client.send(withKeywordsSubstituted.toString());
}
public SimulatorConfig getConfiguration() {