2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Copyright (C) 2017 Amdocs
\r
8 * ================================================================================
\r
9 * Modifications Copyright (C) 2019 Ericsson
\r
10 * =============================================================================
\r
11 * Licensed under the Apache License, Version 2.0 (the "License");
\r
12 * you may not use this file except in compliance with the License.
\r
13 * You may obtain a copy of the License at
\r
15 * http://www.apache.org/licenses/LICENSE-2.0
\r
17 * Unless required by applicable law or agreed to in writing, software
\r
18 * distributed under the License is distributed on an "AS IS" BASIS,
\r
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
20 * See the License for the specific language governing permissions and
\r
21 * limitations under the License.
\r
23 * ============LICENSE_END=========================================================
\r
26 package org.onap.appc.adapter.factory;
\r
28 import java.util.Collection;
\r
29 import java.util.Set;
\r
31 import org.onap.appc.adapter.message.Consumer;
\r
32 import org.onap.appc.adapter.message.MessageAdapterFactory;
\r
33 import org.onap.appc.adapter.message.Producer;
\r
34 import org.onap.appc.adapter.messaging.dmaap.http.HttpDmaapConsumerImpl;
\r
35 import org.onap.appc.adapter.messaging.dmaap.http.HttpDmaapProducerImpl;
\r
37 public class DmaapMessageAdapterFactoryImpl implements MessageAdapterFactory {
\r
41 public Producer createProducer(Collection<String> pools, String writeTopic, String apiKey, String apiSecret) {
\r
42 return new HttpDmaapProducerImpl(pools, writeTopic);
\r
46 public Producer createProducer(Collection<String> pools, Set<String> writeTopics, String apiKey, String apiSecret) {
\r
48 for(String s : writeTopics){
\r
51 return new HttpDmaapProducerImpl(pools, topic);
\r
55 public Consumer createConsumer(Collection<String> pool, String readTopic,
\r
56 String clientName, String clientId, String filterJson, String apiKey, String apiSecret) {
\r
57 return new HttpDmaapConsumerImpl(pool, readTopic, clientName, clientId, apiKey, apiSecret, filterJson);
\r