X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Freactor%2Fengine%2FStarter.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Freactor%2Fengine%2FStarter.java;h=0000000000000000000000000000000000000000;hb=6f69aff66ba5617d0bb27874014b4274bc551ab8;hp=0a0941e0a71733d0301744b9cbe49ee3136ea2d3;hpb=13a4fe6bece23b3dd561de657cf9bb7ea307e2b6;p=rhynodge.git diff --git a/src/main/java/net/pterodactylus/reactor/engine/Starter.java b/src/main/java/net/pterodactylus/reactor/engine/Starter.java deleted file mode 100644 index 0a0941e..0000000 --- a/src/main/java/net/pterodactylus/reactor/engine/Starter.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Reactor - Starter.java - Copyright © 2013 David Roden - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package net.pterodactylus.reactor.engine; - -import net.pterodactylus.reactor.loader.ChainWatcher; -import net.pterodactylus.reactor.states.StateManager; - -import com.lexicalscope.jewel.cli.CliFactory; -import com.lexicalscope.jewel.cli.Option; - -/** - * Reactor main starter class. - * - * @author David ‘Bombe’ Roden - */ -public class Starter { - - /** - * JVM main entry method. - * - * @param arguments - * Command-line arguments - */ - public static void main(String... arguments) { - - /* parse command line. */ - Parameters parameters = CliFactory.parseArguments(Parameters.class, arguments); - - /* create the state manager. */ - StateManager stateManager = new StateManager(parameters.getStateDirectory()); - - /* create the engine. */ - Engine engine = new Engine(stateManager); - - /* start a watcher. */ - ChainWatcher chainWatcher = new ChainWatcher(engine, parameters.getChainDirectory()); - chainWatcher.start(); - - /* start the engine. */ - engine.start(); - } - - /** - * Definition of the command-line parameters. - * - * @author David ‘Bombe’ Roden - */ - private static interface Parameters { - - /** - * Returns the directory to watch for chains. - * - * @return The chain directory - */ - @Option(defaultValue = "chains", shortName = "c", description = "The directory to watch for chains") - String getChainDirectory(); - - /** - * Returns the directory to store states in. - * - * @return The states directory - */ - @Option(defaultValue = "states", shortName = "s", description = "The directory to store states in") - String getStateDirectory(); - - } - -}