diff options
Diffstat (limited to 'services/services-onappf')
2 files changed, 9 insertions, 8 deletions
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java index e48d75eb7..968c54d3d 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,10 +23,8 @@ package org.onap.policy.apex.services.onappf; import java.util.List; import java.util.Properties; - import lombok.Getter; import lombok.Setter; - import org.onap.policy.apex.services.onappf.comm.PdpStateChangeListener; import org.onap.policy.apex.services.onappf.comm.PdpStatusPublisher; import org.onap.policy.apex.services.onappf.comm.PdpUpdateListener; @@ -34,7 +33,7 @@ import org.onap.policy.apex.services.onappf.exception.ApexStarterRunTimeExceptio import org.onap.policy.apex.services.onappf.handler.PdpMessageHandler; import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup; import org.onap.policy.apex.services.onappf.rest.ApexStarterRestServer; -import org.onap.policy.common.endpoints.event.comm.TopicEndpoint; +import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager; import org.onap.policy.common.endpoints.event.comm.TopicSink; import org.onap.policy.common.endpoints.event.comm.TopicSource; import org.onap.policy.common.endpoints.listeners.MessageTypeDispatcher; @@ -86,8 +85,8 @@ public class ApexStarterActivator { public ApexStarterActivator(final ApexStarterParameterGroup apexStarterParameterGroup, final Properties topicProperties) { - topicSinks = TopicEndpoint.manager.addTopicSinks(topicProperties); - topicSources = TopicEndpoint.manager.addTopicSources(topicProperties); + topicSinks = TopicEndpointManager.getManager().addTopicSinks(topicProperties); + topicSources = TopicEndpointManager.getManager().addTopicSources(topicProperties); // TODO: instanceId currently set as a random string, could be fetched from actual deployment final int random = (int) (Math.random() * 100); @@ -105,8 +104,8 @@ public class ApexStarterActivator { // @formatter:off this.manager = new ServiceManager() .addAction("topics", - () -> TopicEndpoint.manager.start(), - () -> TopicEndpoint.manager.shutdown()) + () -> TopicEndpointManager.getManager().start(), + () -> TopicEndpointManager.getManager().shutdown()) .addAction("set alive", () -> setAlive(true), () -> setAlive(false)) diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java index ba5585b85..fe3b0671b 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +27,7 @@ import java.util.Properties; import org.onap.policy.common.capabilities.Startable; import org.onap.policy.common.endpoints.http.server.HttpServletServer; +import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance; import org.onap.policy.common.endpoints.parameters.RestServerParameters; import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties; import org.onap.policy.common.gson.GsonMessageBodyHandler; @@ -59,7 +61,7 @@ public class ApexStarterRestServer implements Startable { @Override public boolean start() { try { - servers = HttpServletServer.factory.build(getServerProperties()); + servers = HttpServletServerFactoryInstance.getServerFactory().build(getServerProperties()); for (final HttpServletServer server : servers) { if (server.isAaf()) { server.addFilterClass(null, ApexStarterAafFilter.class.getName()); |