summaryrefslogtreecommitdiffstats
path: root/forwarding
diff options
context:
space:
mode:
Diffstat (limited to 'forwarding')
-rw-r--r--forwarding/src/main/java/org/onap/policy/distribution/forwarding/PolicyForwarder.java15
-rw-r--r--forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java15
2 files changed, 29 insertions, 1 deletions
diff --git a/forwarding/src/main/java/org/onap/policy/distribution/forwarding/PolicyForwarder.java b/forwarding/src/main/java/org/onap/policy/distribution/forwarding/PolicyForwarder.java
index 5272fc9b..5bd53804 100644
--- a/forwarding/src/main/java/org/onap/policy/distribution/forwarding/PolicyForwarder.java
+++ b/forwarding/src/main/java/org/onap/policy/distribution/forwarding/PolicyForwarder.java
@@ -25,10 +25,25 @@ import org.onap.policy.distribution.model.Policy;
/**
* Forwards polices.
+ * <p>
+ * To create a policy forwarder a class implementing this interface must be created, along with a
+ * concrete sub class of PolicyForwarderConfigurationParameterGroup to handle configuration
+ * parameters for the policy forwarder.
*/
public interface PolicyForwarder {
/**
+ * Configure the policy forwarder.
+ * <p>
+ * This method will be invoked immediately after instantiation in order for the policy forwarder
+ * to configure itself.
+ *
+ * @param parameterGroupName the name of the parameter group which contains the configuration
+ * for the policy forwarder
+ */
+ void configure(String parameterGroupName);
+
+ /**
* Forward the given policies.
*
* @param policies the policies to forward
diff --git a/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java b/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java
index 28a1b1be..2426cccd 100644
--- a/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java
+++ b/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java
@@ -37,16 +37,20 @@ public class PolicyForwarderParameters implements ParameterGroup {
private String forwarderType;
private String forwarderClassName;
+ private String forwarderConfigurationName;
/**
* Constructor for instantiating PolicyForwarderParameters.
*
* @param forwarderType the policy forwarder type
* @param forwarderClassName the policy forwarder class name
+ * @param forwarderConfigurationName the name of the configuration for the policy forwarder
*/
- public PolicyForwarderParameters(final String forwarderType, final String forwarderClassName) {
+ public PolicyForwarderParameters(final String forwarderType, final String forwarderClassName,
+ final String forwarderConfigurationName) {
this.forwarderType = forwarderType;
this.forwarderClassName = forwarderClassName;
+ this.forwarderConfigurationName = forwarderConfigurationName;
}
/**
@@ -68,6 +72,15 @@ public class PolicyForwarderParameters implements ParameterGroup {
}
/**
+ * Return the name of the forwarder configuration of this PolicyForwarderParameters instance.
+ *
+ * @return the the name of the forwarder configuration
+ */
+ public String getForwarderConfigurationName() {
+ return forwarderConfigurationName;
+ }
+
+ /**
* {@inheritDoc}
*/
@Override