X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Fdmaap%2FDmaapMessageConsumer.java;h=f03aa582a0760c8c4f217d1dccd049a3bc188f1f;hb=67cb2d0bd5b6294cd021f4c8931bcb9d5c2a5dc5;hp=3cc1b77d2f9cad3b37b99ae66d9ae26d336d0f95;hpb=889b38fd05bc9143647827742e3a8e0f10783bc8;p=nonrtric.git diff --git a/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageConsumer.java b/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageConsumer.java index 3cc1b77d..f03aa582 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageConsumer.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageConsumer.java @@ -22,7 +22,6 @@ package org.oransc.policyagent.dmaap; import com.google.common.collect.Iterables; -import java.io.FileNotFoundException; import java.io.IOException; import java.time.Duration; import java.util.Properties; @@ -41,7 +40,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; /** - * The class fetched incoming requests from DMAAP on regular intervals. Each + * The class fetches incoming requests from DMAAP on regular intervals. Each * received request is proceesed by DmaapMessageHandler. */ @Component @@ -49,7 +48,7 @@ public class DmaapMessageConsumer implements Runnable { private static final Logger logger = LoggerFactory.getLogger(DmaapMessageConsumer.class); - private final static Duration TIME_BETWEEN_DMAAP_POLLS = Duration.ofSeconds(10); + private static final Duration TIME_BETWEEN_DMAAP_POLLS = Duration.ofSeconds(10); private final ApplicationConfig applicationConfig; @@ -64,10 +63,6 @@ public class DmaapMessageConsumer implements Runnable { thread.start(); } - DmaapMessageConsumer(ApplicationConfig applicationConfig, boolean start) { - this.applicationConfig = applicationConfig; - } - private boolean isDmaapConfigured() { Properties consumerCfg = applicationConfig.getDmaapConsumerConfig(); Properties producerCfg = applicationConfig.getDmaapPublisherConfig(); @@ -133,7 +128,7 @@ public class DmaapMessageConsumer implements Runnable { } } - MRConsumer getMessageRouterConsumer(Properties dmaapConsumerProperties) throws FileNotFoundException, IOException { + MRConsumer getMessageRouterConsumer(Properties dmaapConsumerProperties) throws IOException { return MRClientFactory.createConsumer(dmaapConsumerProperties); } @@ -145,8 +140,7 @@ public class DmaapMessageConsumer implements Runnable { return new AsyncRestClient(agentBaseUrl); } - MRBatchingPublisher getMessageRouterPublisher(Properties dmaapPublisherProperties) - throws FileNotFoundException, IOException { + MRBatchingPublisher getMessageRouterPublisher(Properties dmaapPublisherProperties) throws IOException { return MRClientFactory.createBatchingPublisher(dmaapPublisherProperties); } }