--- /dev/null
+/*-\r
+ * ============LICENSE_START=======================================================\r
+ * ONAP : APPC\r
+ * ================================================================================\r
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.\r
+ * ================================================================================\r
+ * Copyright (C) 2017 Amdocs\r
+ * ================================================================================\r
+ * Modifications Copyright (C) 2019 Ericsson\r
+ * =============================================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ * ============LICENSE_END=========================================================\r
+ */\r
+\r
+package org.onap.appc.adapter.factory;\r
+\r
+import java.util.Collection;\r
+import java.util.Set;\r
+\r
+import org.onap.appc.adapter.message.Consumer;\r
+import org.onap.appc.adapter.message.MessageAdapterFactory;\r
+import org.onap.appc.adapter.message.Producer;\r
+import org.onap.appc.adapter.messaging.dmaap.http.HttpDmaapConsumerImpl;\r
+import org.onap.appc.adapter.messaging.dmaap.http.HttpDmaapProducerImpl;\r
+\r
+public class DmaapMessageAdapterFactoryImpl implements MessageAdapterFactory {\r
+\r
+\r
+ @Override\r
+ public Producer createProducer(Collection<String> pools, String writeTopic, String apiKey, String apiSecret) {\r
+ return new HttpDmaapProducerImpl(pools, writeTopic);\r
+ }\r
+\r
+ @Override\r
+ public Producer createProducer(Collection<String> pools, Set<String> writeTopics, String apiKey, String apiSecret) {\r
+ String topic = "";\r
+ for(String s : writeTopics){\r
+ topic = s;\r
+ }\r
+ return new HttpDmaapProducerImpl(pools, topic);\r
+ }\r
+\r
+ @Override\r
+ public Consumer createConsumer(Collection<String> pool, String readTopic, \r
+ String clientName, String clientId, String filterJson, String apiKey, String apiSecret) {\r
+ return new HttpDmaapConsumerImpl(pool, readTopic, clientName, clientId, apiKey, apiSecret, filterJson);\r
+ }\r
+}\r