@@ -0,0 +1,1626 @@
+package com.github.aureliano.evtbridge.core.agent;%0A%0Aimport com.github.aureliano.evtbridge.core.config.IConfigInput;%0Aimport com.github.aureliano.evtbridge.core.config.IConfiguration;%0A%0Apublic abstract class AbstractDataReader implements IDataReader %7B%0A%0A%09protected IConfigInput inputConfiguration;%0A%09protected long lineCounter;%0A%09protected String unprocessedLine;%0A%09protected boolean markedToStop;%0A%09%0A%09public AbstractDataReader() %7B%0A%09%09this.lineCounter = 0;%0A%09%09this.markedToStop = false;%0A%09%7D%0A%09%0A%09@Override%0A%09public String nextData() %7B%0A%09%09String line = this.readNextLine();%0A%09%09%0A%09%09if (line == null) %7B%0A%09%09%09this.markedToStop = true;%0A%09%09%09return null;%0A%09%09%7D%0A%09%09%0A%09%09throw new UnsupportedOperationException(%22Not implemented yet.%22);%0A%09%09//return this.prepareLogEvent(line);%0A%09%7D%0A%09%0A%09@Override%0A%09public IConfigInput getConfiguration() %7B%0A%09%09return this.inputConfiguration;%0A%09%7D%0A%09%0A%09@Override%0A%09public IDataReader withConfiguration(IConfiguration configuration) %7B%0A%09%09this.inputConfiguration = (IConfigInput) configuration;%0A%09%09return this;%0A%09%7D%0A%0A%09@Override%0A%09public boolean keepReading() %7B%0A%09%09return !this.markedToStop;%0A%09%7D%0A%09%0A%09@Override%0A%09public String readNextLine() %7B%0A%09%09String line = null;%0A%09%09if (this.unprocessedLine != null) %7B%0A%09%09%09line = this.unprocessedLine;%0A%09%09%09this.unprocessedLine = null;%0A%09%09%7D else %7B%0A%09%09%09line = this.readLine();%0A%09%09%09if (line != null) %7B%0A%09%09%09%09this.lineCounter++;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09return line;%0A%09%7D%0A%09%0A%09@Override%0A%09public void executeBeforeReadingListeners() %7B%0A%09%09throw new UnsupportedOperationException(%22Not implemented yet.%22);%0A%09%7D%0A%09%0A%09@Override%0A%09public void executeAfterReadingListeners(String data) %7B%0A%09%09throw new UnsupportedOperationException(%22Not implemented yet.%22);%0A%09%7D%0A%7D

Create abstract data reader.