X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=main%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpdpx%2Fmain%2Fstartstop%2FXacmlPdpActivator.java;h=4db11d0f84459d168d26badfe7a7f392795543be;hb=ae182a04e4bf5c05bebcefe71d1fd000363aab09;hp=70dd2c42a658d9b13875571f5238c25a029f0379;hpb=72437db96093801ebef94d22418cd2e7a86a08f2;p=policy%2Fxacml-pdp.git diff --git a/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java b/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java index 70dd2c42..4db11d0f 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java @@ -104,13 +104,13 @@ public class XacmlPdpActivator extends ServiceManagerContainer { TopicEndpoint.manager.addTopicSources(topicProperties); try { - TopicSinkClient sinkClient = new TopicSinkClient(TOPIC); + final TopicSinkClient sinkClient = new TopicSinkClient(TOPIC); + this.message = new XacmlPdpMessage(); this.xacmlPdpParameterGroup = xacmlPdpParameterGroup; this.msgDispatcher = new MessageTypeDispatcher(MSG_TYPE_NAMES); - this.pdpStateChangeListener = new XacmlPdpStateChangeListener(sinkClient); - this.pdpUpdateListener = new XacmlPdpUpdateListener(sinkClient); + this.pdpStateChangeListener = new XacmlPdpStateChangeListener(sinkClient, message); + this.pdpUpdateListener = new XacmlPdpUpdateListener(sinkClient, message); this.register = new XacmlPdpPapRegistration(sinkClient); - this.message = new XacmlPdpMessage(); } catch (RuntimeException | TopicSinkClientException e) { throw new PolicyXacmlPdpRuntimeException(e.getMessage(), e); } @@ -154,10 +154,10 @@ public class XacmlPdpActivator extends ServiceManagerContainer { addAction("Initial Registration with PAP", () -> { - register.pdpRegistration(message.formatStatusMessage(PdpState.PASSIVE)); + register.pdpRegistration(message.formatInitialStatusMessage(PdpState.PASSIVE)); }, () -> { - register.pdpRegistration(message.formatStatusMessage(PdpState.TERMINATED)); + register.pdpRegistration(message.formatInitialStatusMessage(PdpState.TERMINATED)); }); // @formatter:on