org.bdware.doip.test.DoipServerTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doip-audit-tool Show documentation
Show all versions of doip-audit-tool Show documentation
doip audit tool developed by bdware
The newest version!
package org.bdware.doip.test;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bdware.doip.audit.EndpointConfig;
import org.bdware.doip.audit.config.FileStorage;
import org.bdware.doip.audit.server.AuditDoipServer;
import java.util.concurrent.atomic.AtomicInteger;
public class DoipServerTest {
static Logger LOGGER = LogManager.getLogger(DoipServerTest.class);
public static void main(String[] arg) throws Exception {
run();
}
public static void run() throws Exception {
FileStorage fileStorage = new FileStorage("./input/auditrepo.json");
EndpointConfig config = fileStorage.loadAsEndpointConfig();
AuditDoipServer server = new AuditDoipServer(config);
final AtomicInteger count = new AtomicInteger(0);
TestRepoHandler handler = new TestRepoHandler();
handler.count = count;
server.setRepositoryHandler(handler);
server.start();
for (; ; ) {
LOGGER.info("Count:" + count.get());
Thread.sleep(10000);
}
}
}