Generate notifications when policies change
[policy/pap.git] / main / src / main / java / org / onap / policy / pap / main / comm / msgdata / RequestImpl.java
index 1945b32..a110ef4 100644 (file)
@@ -30,6 +30,7 @@ import org.onap.policy.models.pdp.concepts.PdpMessage;
 import org.onap.policy.models.pdp.concepts.PdpStatus;
 import org.onap.policy.pap.main.comm.QueueToken;
 import org.onap.policy.pap.main.comm.TimerManager;
+import org.onap.policy.pap.main.notification.PolicyNotifier;
 import org.onap.policy.pap.main.parameters.RequestParams;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -63,6 +64,13 @@ public abstract class RequestImpl implements Request {
     @Setter
     private RequestListener listener;
 
+    /**
+     * Notifier for policy update completions.
+     */
+    @Getter
+    @Setter
+    private PolicyNotifier notifier;
+
     /**
      * Current retry count.
      */
@@ -217,7 +225,7 @@ public abstract class RequestImpl implements Request {
 
         // couldn't take the other's place - add our own token to the queue
         token = new QueueToken<>(message);
-        params.getPublisher().enqueue(token);
+        params.getPdpPublisher().enqueue(token);
     }
 
     /**