All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bitbucket.bradleysmithllc.etlagent.server.EtlAgent Maven / Gradle / Ivy

package org.bitbucket.bradleysmithllc.etlagent.server;

import org.apache.commons.io.FileUtils;
import org.bitbucket.bradleysmithllc.etlagent.Server;
import org.bitbucket.bradleysmithllc.etlagent.resources.ContextBase;
import org.bitbucket.bradleysmithllc.java_cl_parser.CLIEntry;
import org.bitbucket.bradleysmithllc.java_cl_parser.CLIMain;
import org.bitbucket.bradleysmithllc.java_cl_parser.CLIOption;
import org.bitbucket.bradleysmithllc.java_cl_parser.CommonsCLILauncher;

import java.io.File;
import java.io.IOException;

@CLIEntry(
		version = "1.2.17",
		description = "Launches the etl agent container",
		nickName = "etlAgent",
		versionControl = "https://[email protected]/bradleysmithllc/etl-agent.git"
)
public class EtlAgent {
	private File etlRoot;

	@CLIOption(
			name = "root",
			longName = "agent-root",
			required = true
	)
	public void setAgentRoot(String path) throws IOException {
		etlRoot = new File(path);
		FileUtils.forceMkdir(etlRoot);

		ContextBase.setRoot(etlRoot);
		ContextBase.initiate(false);
	}

	@CLIMain
	public void runServer() throws IOException, InterruptedException {
		ContextBase.initialize();
		Server.start();

		Thread.sleep(Long.MAX_VALUE);
	}

	public static void main(String[] args) {
		CommonsCLILauncher.mainClean(args);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy