summaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-engine/src/main/java')
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterConstants.java2
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterHandler.java6
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameters.java3
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java3
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJSONAdapter.java12
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java3
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParametersJSONAdapter.java16
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventhandler/EventHandlerParameters.java54
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParameters.java3
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJSONAdapter.java12
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolTextCharDelimitedParameters.java3
11 files changed, 80 insertions, 37 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterConstants.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterConstants.java
index 1937fd2bf..4cef1e10b 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterConstants.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterConstants.java
@@ -29,7 +29,7 @@ public abstract class ApexParameterConstants {
public static final String EVENT_HANDLER_GROUP_NAME = "EVENT_HANDLER_PARAMETERS";
/**
- * Private default constructor to prevent subclassing
+ * Private default constructor to prevent subclassing.
*/
private ApexParameterConstants() {
// Prevents subclassing
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterHandler.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterHandler.java
index c93e52118..2e8e66ae8 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterHandler.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterHandler.java
@@ -22,6 +22,9 @@ package org.onap.policy.apex.service.parameters;
import java.io.FileReader;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
import org.onap.policy.apex.core.engine.EngineParameters;
import org.onap.policy.apex.service.engine.main.ApexCommandLineArguments;
import org.onap.policy.apex.service.parameters.carriertechnology.CarrierTechnologyParameters;
@@ -35,9 +38,6 @@ import org.onap.policy.common.parameters.ParameterService;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
/**
* This class handles reading, parsing and validating of Apex parameters from JSON files.
*
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameters.java
index 069bcc9a8..87b86a897 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameters.java
@@ -305,7 +305,8 @@ public class ApexParameters implements ParameterGroup {
// Check that the peer reference is OK
if (rightModeParameters == null) {
result.setResult(handlerMapVariableName, leftModeParameterEntry.getKey(), ValidationStatus.INVALID,
- PEER_STRING + '"' + leftModeParameters.getPeer(peeredMode) + FOR_PEERED_MODE_STRING + peeredMode
+ PEER_STRING + '"' + leftModeParameters.getPeer(peeredMode) + FOR_PEERED_MODE_STRING
+ + peeredMode
+ " does not exist or is not defined with the same peered mode");
continue;
}
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java
index 41e30188b..593c6d86f 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java
@@ -29,8 +29,7 @@ import org.onap.policy.common.parameters.ValidationStatus;
* The default carrier technology parameter class that may be specialized by carrier technology plugins that require
* plugin specific parameters.
*
- * <p>
- * The following parameters are defined:
+ * <p>The following parameters are defined:
* <ol>
* <li>label: The label of the carrier technology.
* <li>eventProducerPluginClass: The name of the plugin class that will be used by Apex to produce and emit output
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJSONAdapter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJSONAdapter.java
index e443c1eb0..b4e342f17 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJSONAdapter.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJSONAdapter.java
@@ -24,12 +24,6 @@ import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
-import org.onap.policy.apex.service.engine.event.impl.eventrequestor.EventRequestorCarrierTechnologyParameters;
-import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FILECarrierTechnologyParameters;
-import org.onap.policy.common.parameters.ParameterRuntimeException;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
@@ -38,6 +32,12 @@ import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
+import org.onap.policy.apex.service.engine.event.impl.eventrequestor.EventRequestorCarrierTechnologyParameters;
+import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FILECarrierTechnologyParameters;
+import org.onap.policy.common.parameters.ParameterRuntimeException;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
/**
* This class deserialises various type of carrier technology parameters from JSON.
*
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java
index 70badae93..ba065d3ef 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java
@@ -36,8 +36,7 @@ import org.onap.policy.apex.core.engine.EngineParameters;
/**
* This class holds the parameters for an Apex Engine Service with multiple engine threads running multiple engines.
*
- * <p>
- * The following parameters are defined:
+ * <p>The following parameters are defined:
* <ol>
* <li>name: The name of the Apex engine service, which can be set to any value that matches the regular expression
* {@link org.onap.policy.apex.model.basicmodel.concepts.AxKey#NAME_REGEXP}.
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParametersJSONAdapter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParametersJSONAdapter.java
index 98e41f6af..50f4925f3 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParametersJSONAdapter.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParametersJSONAdapter.java
@@ -23,6 +23,14 @@ package org.onap.policy.apex.service.parameters.engineservice;
import java.lang.reflect.Type;
import java.util.Map.Entry;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+
import org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters;
import org.onap.policy.apex.context.parameters.ContextParameters;
import org.onap.policy.apex.context.parameters.DistributorParameters;
@@ -37,14 +45,6 @@ import org.onap.policy.common.parameters.ParameterRuntimeException;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
-import com.google.gson.JsonDeserializationContext;
-import com.google.gson.JsonDeserializer;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParseException;
-import com.google.gson.JsonSerializationContext;
-import com.google.gson.JsonSerializer;
-
/**
* This class deserializes engine service parameters from JSON format. The class produces an
* {@link EngineServiceParameters} instance from incoming JSON read from a configuration file in JSON format.
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventhandler/EventHandlerParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventhandler/EventHandlerParameters.java
index 76ccd683c..996899052 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventhandler/EventHandlerParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventhandler/EventHandlerParameters.java
@@ -33,12 +33,10 @@ import org.onap.policy.common.parameters.ValidationStatus;
/**
* The parameters for a single event producer, event consumer or synchronous event handler.
*
- * <p>
- * Event producers, consumers, and synchronous event handlers all use a carrier technology and an event protocol so the
+ * <p>Event producers, consumers, and synchronous event handlers all use a carrier technology and an event protocol so the
* actual parameters for each one are the same. Therefore, we use the same class for the parameters of each one.
*
- * <p>
- * The following parameters are defined:
+ * <p>The following parameters are defined:
* <ol>
* <li>carrierTechnologyParameters: The carrier technology is the type of messaging infrastructure used to carry events.
* Examples are File, Kafka or REST.
@@ -341,6 +339,54 @@ public class EventHandlerParameters implements ParameterGroup {
return result;
}
+ /**
+ * Check if we're using synchronous mode
+ *
+ * @return true if if we're using synchronous mode
+ */
+ public boolean isSynchronousMode() {
+ return synchronousMode;
+ }
+
+ /**
+ * The synchronous peer for this event handler
+ * @return the synchronous peer for this event handler
+ */
+ public String getSynchronousPeer() {
+ return synchronousPeer;
+ }
+
+ /**
+ * Get the timeout for synchronous operations
+ * @return the timeout for synchronous operations
+ */
+ public long getSynchronousTimeout() {
+ return synchronousTimeout;
+ }
+
+ /**
+ * Check if this event handler will use requestor mode
+ * @return true if this event handler will use requestor mode
+ */
+ public boolean isRequestorMode() {
+ return requestorMode;
+ }
+
+ /**
+ * The requestor peer for this event handler
+ * @return the requestor peer for this event handler
+ */
+ public String getRequestorPeer() {
+ return requestorPeer;
+ }
+
+ /**
+ * @return the requestorTimeout
+ */
+ public long getRequestorTimeout() {
+ return requestorTimeout;
+ }
+
/*
* (non-Javadoc)
*
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParameters.java
index 06b5e41f5..29afc4edb 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParameters.java
@@ -29,8 +29,7 @@ import org.onap.policy.common.parameters.ValidationStatus;
* A default event protocol parameter class that may be specialized by event protocol plugins that require plugin
* specific parameters.
*
- * <p>
- * The following parameters are defined:
+ * <p>The following parameters are defined:
* <ol>
* <li>label: The label of the event protocol technology.
* <li>eventProducerPluginClass: The name of the plugin class that will be used by Apex to produce and emit output
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJSONAdapter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJSONAdapter.java
index 2f09e0a65..645368509 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJSONAdapter.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJSONAdapter.java
@@ -24,12 +24,6 @@ import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
-import org.onap.policy.apex.service.engine.event.impl.apexprotocolplugin.ApexEventProtocolParameters;
-import org.onap.policy.apex.service.engine.event.impl.jsonprotocolplugin.JSONEventProtocolParameters;
-import org.onap.policy.common.parameters.ParameterRuntimeException;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
@@ -38,6 +32,12 @@ import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
+import org.onap.policy.apex.service.engine.event.impl.apexprotocolplugin.ApexEventProtocolParameters;
+import org.onap.policy.apex.service.engine.event.impl.jsonprotocolplugin.JSONEventProtocolParameters;
+import org.onap.policy.common.parameters.ParameterRuntimeException;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
/**
* This class serialises and deserialises various type of event protocol parameters to and from
* JSON.
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolTextCharDelimitedParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolTextCharDelimitedParameters.java
index d10d81ce2..bf8d1a5e1 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolTextCharDelimitedParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolTextCharDelimitedParameters.java
@@ -27,8 +27,7 @@ import org.onap.policy.common.parameters.ValidationStatus;
* An event protocol parameter class for character delimited textual event protocols that may be specialized by event
* protocol plugins that require plugin specific parameters.
*
- * <p>
- * The following parameters are defined:
+ * <p>The following parameters are defined:
* <ol>
* <li>startChar: starting character delimiter for text blocks containing an event.
* <li>endChar: ending character delimiter for text blocks containing an event.