diff options
author | Patrick Brady <pb071s@att.com> | 2017-07-28 11:29:23 -0700 |
---|---|---|
committer | Patrick Brady <pb071s@att.com> | 2017-08-02 15:43:44 +0000 |
commit | 38713207b817ed4700f630748c681116338d32f0 (patch) | |
tree | 9eb2097cee8d85ac14f17e3a280ae8aefb69d9de /appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java | |
parent | 771ac55e29d099d8bbf783612de975047d75ab12 (diff) |
Merging in bug fixes
Change-Id: I85da90b9ba0d03149f42035a820c76ef0285e413
Signed-off-by: Patrick Brady <pb071s@att.com>
Issue: APPC-100
Diffstat (limited to 'appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java')
-rw-r--r-- | appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/openecomp/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/openecomp/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/openecomp/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java index ed27db93e..d555f3952 100644 --- a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/openecomp/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java +++ b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/openecomp/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java @@ -30,21 +30,29 @@ import java.util.Set; import org.openecomp.appc.adapter.message.Consumer; import org.openecomp.appc.adapter.message.MessageAdapterFactory; import org.openecomp.appc.adapter.message.Producer; + import org.openecomp.appc.adapter.messaging.dmaap.http.HttpDmaapConsumerImpl; import org.openecomp.appc.adapter.messaging.dmaap.http.HttpDmaapProducerImpl; +import org.openecomp.appc.adapter.messaging.dmaap.impl.DmaapConsumerImpl; +import org.openecomp.appc.adapter.messaging.dmaap.impl.DmaapProducerImpl; + public class DmaapMessageAdapterFactoryImpl implements MessageAdapterFactory { + //Set to true if the HttpDmaap... should be used instead of the regular Dmaap... + private static final boolean HTTP = true; + public Producer createProducer(Collection<String> pools, String writeTopic, String apiKey, String apiSecret) { - return new HttpDmaapProducerImpl(pools, writeTopic); + return HTTP ? new HttpDmaapProducerImpl(pools, writeTopic) : new DmaapProducerImpl(pools, writeTopic,apiKey, apiSecret); } - + public Producer createProducer(Collection<String> pools, Set<String> writeTopics, String apiKey, String apiSecret) { - return new HttpDmaapProducerImpl(pools, writeTopics); + return HTTP ? new HttpDmaapProducerImpl(pools, writeTopics) : new DmaapProducerImpl(pools, writeTopics, apiKey, apiSecret); } public Consumer createConsumer(Collection<String> pool, String readTopic, - String clientName, String clientId, String filter_json, String apiKey, String apiSecret) { - return new HttpDmaapConsumerImpl(pool, readTopic, clientName, clientId, apiKey, apiSecret, filter_json); + String clientName, String clientId, String filter_json, String apiKey, String apiSecret) { + return HTTP ? new HttpDmaapConsumerImpl(pool, readTopic, clientName, clientId, apiKey, apiSecret, filter_json) : + new DmaapConsumerImpl(pool, readTopic, clientName, clientId, apiKey, apiSecret, filter_json); } } |