* ========================LICENSE_START=================================
* O-RAN-SC
* %%
- * Copyright (C) 2019 Nordix Foundation
+ * Copyright (C) 2020 Nordix Foundation
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import com.google.common.collect.Iterables;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.time.Duration;
import java.util.Properties;
}
}
- private Iterable<String> fetchAllMessages() throws ServiceException, FileNotFoundException, IOException {
+ private Iterable<String> fetchAllMessages() throws ServiceException, IOException {
Properties dmaapConsumerProperties = this.applicationConfig.getDmaapConsumerConfig();
MRConsumer consumer = MRClientFactory.createConsumer(dmaapConsumerProperties);
MRConsumerResponse response = consumer.fetchWithReturnConsumerResponse();
}
}
- private void processMsg(String msg) throws Exception {
+ private void processMsg(String msg) throws IOException {
logger.debug("Message Reveived from DMAAP : {}", msg);
createDmaapMessageHandler().handleDmaapMsg(msg);
}
- private DmaapMessageHandler createDmaapMessageHandler() throws FileNotFoundException, IOException {
+ private DmaapMessageHandler createDmaapMessageHandler() throws IOException {
String agentBaseUrl = "http://localhost:" + this.localServerPort;
AsyncRestClient agentClient = new AsyncRestClient(agentBaseUrl);
Properties dmaapPublisherProperties = applicationConfig.getDmaapPublisherConfig();
MRBatchingPublisher producer = MRClientFactory.createBatchingPublisher(dmaapPublisherProperties);
- return new DmaapMessageHandler(producer, this.applicationConfig, agentClient);
+ return new DmaapMessageHandler(producer, agentClient);
}
private boolean sleep(Duration duration) {