diff options
author | jrh3 <jrh3@att.com> | 2019-07-17 09:45:45 -0400 |
---|---|---|
committer | jrh3 <jrh3@att.com> | 2019-07-17 10:00:14 -0400 |
commit | c74aaaa485af73b9b57a32fa872362595475aa14 (patch) | |
tree | 3476463dfb3d465779e4661236c15fd47c9ac008 /main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java | |
parent | 27f6bacd9c7ef76557a8a653142ed8e67a091a5a (diff) |
Modify pap to use RestServer from common
Issue-ID: POLICY-1652
Signed-off-by: jrh3 <jrh3@att.com>
Change-Id: If97c5667f52811cfb3bdf1f7c8caf763e6bfa3b6
Signed-off-by: jrh3 <jrh3@att.com>
Diffstat (limited to 'main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java')
-rw-r--r-- | main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java b/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java index 5ceb55a1..a15bc0f1 100644 --- a/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java +++ b/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java @@ -26,6 +26,7 @@ import java.util.Properties; import java.util.concurrent.atomic.AtomicReference; import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager; import org.onap.policy.common.endpoints.event.comm.TopicSource; +import org.onap.policy.common.endpoints.http.server.RestServer; import org.onap.policy.common.endpoints.listeners.MessageTypeDispatcher; import org.onap.policy.common.endpoints.listeners.RequestIdDispatcher; import org.onap.policy.common.parameters.ParameterService; @@ -44,8 +45,15 @@ import org.onap.policy.pap.main.comm.TimerManager; import org.onap.policy.pap.main.parameters.PapParameterGroup; import org.onap.policy.pap.main.parameters.PdpModifyRequestMapParams; import org.onap.policy.pap.main.parameters.PdpParameters; -import org.onap.policy.pap.main.rest.PapRestServer; +import org.onap.policy.pap.main.rest.HealthCheckRestControllerV1; +import org.onap.policy.pap.main.rest.PapAafFilter; import org.onap.policy.pap.main.rest.PapStatisticsManager; +import org.onap.policy.pap.main.rest.PdpGroupHealthCheckControllerV1; +import org.onap.policy.pap.main.rest.PdpGroupQueryControllerV1; +import org.onap.policy.pap.main.rest.PdpGroupStateChangeControllerV1; +import org.onap.policy.pap.main.rest.StatisticsRestControllerV1; +import org.onap.policy.pap.main.rest.depundep.PdpGroupDeleteControllerV1; +import org.onap.policy.pap.main.rest.depundep.PdpGroupDeployControllerV1; /** * This class activates Policy Administration (PAP) as a complete service together with all its controllers, listeners & @@ -113,7 +121,7 @@ public class PapActivator extends ServiceManagerContainer { final AtomicReference<TimerManager> heartBeatTimers = new AtomicReference<>(); final AtomicReference<PolicyModelsProviderFactoryWrapper> daoFactory = new AtomicReference<>(); final AtomicReference<PdpModifyRequestMap> requestMap = new AtomicReference<>(); - final AtomicReference<PapRestServer> restServer = new AtomicReference<>(); + final AtomicReference<RestServer> restServer = new AtomicReference<>(); // @formatter:off addAction("PAP parameters", @@ -208,7 +216,15 @@ public class PapActivator extends ServiceManagerContainer { addAction("REST server", () -> { - restServer.set(new PapRestServer(papParameterGroup.getRestServerParameters())); + RestServer server = new RestServer(papParameterGroup.getRestServerParameters(), PapAafFilter.class, + HealthCheckRestControllerV1.class, + StatisticsRestControllerV1.class, + PdpGroupDeployControllerV1.class, + PdpGroupDeleteControllerV1.class, + PdpGroupStateChangeControllerV1.class, + PdpGroupQueryControllerV1.class, + PdpGroupHealthCheckControllerV1.class); + restServer.set(server); restServer.get().start(); }, () -> restServer.get().stop()); |