changes
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
package de.hottis.measurementCollector;
|
||||
|
||||
import de.hottis.common.HottisCommonException;
|
||||
import de.hottis.common.MyQueue;
|
||||
import de.hottis.smarthomelib.ADataObject;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
@ -10,8 +13,8 @@ import org.apache.logging.log4j.Logger;
|
||||
public abstract class AMessageParser {
|
||||
final protected Logger logger = LogManager.getRootLogger();
|
||||
|
||||
private String topic;
|
||||
private MyQueue<ADataObject> queue;
|
||||
private final String topic;
|
||||
private final MyQueue<ADataObject> queue;
|
||||
protected Properties config;
|
||||
|
||||
public AMessageParser(String topic, Properties config, MyQueue<ADataObject> queue) {
|
||||
@ -28,7 +31,7 @@ public abstract class AMessageParser {
|
||||
return this.topic;
|
||||
}
|
||||
|
||||
public void enqueue(List<ADataObject> itemList) throws MeasurementCollectorException {
|
||||
public void enqueue(List<ADataObject> itemList) throws HottisCommonException {
|
||||
for (ADataObject ado : itemList) {
|
||||
queue.enqueue(ado);
|
||||
logger.debug("message enqueued");
|
||||
|
Reference in New Issue
Block a user