本文整理汇总了Java中asg.cliche.ShellFactory类的典型用法代码示例。如果您正苦于以下问题:Java ShellFactory类的具体用法?Java ShellFactory怎么用?Java ShellFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ShellFactory类属于asg.cliche包,在下文中一共展示了ShellFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import asg.cliche.ShellFactory; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
ImcShell imcShell = new ImcShell();
Shell shell = ShellFactory.createConsoleShell("?", "IMC Shell",
imcShell);
imcShell.setReference(shell);
if (args.length == 1 && new File(args[0]).canRead()) {
BufferedReader reader = new BufferedReader(new FileReader(new File(
args[0])));
String line;
while ((line = reader.readLine()) != null) {
if (line.startsWith("#") || line.trim().isEmpty())
continue;
shell.processLine(line);
}
reader.close();
return;
}
shell.setDisplayTime(true);
System.out.println("Using IMC v"
+ IMCDefinition.getInstance().getVersion() + " ("
+ ImcStringDefs.IMC_SHA
+ ").\nEnter ?help for usage information.");
shell.commandLoop();
}
示例2: enterShell
import asg.cliche.ShellFactory; //导入依赖的package包/类
public void enterShell(AbstractHandler subHandler, String name) {
try {
subHandler.current = ShellFactory.createSubshell(name, current, "minecloud", subHandler);
subHandler.current.commandLoop();
} catch (IOException ex) {
throw new MineCloudException("Error encountered when in sub-command loop!", ex);
}
}
示例3: round
import asg.cliche.ShellFactory; //导入依赖的package包/类
@Command(name = "round", description = "Avvia la modifica del girone")
public String round() throws IOException{
System.out.println("Avviata modifica del girone, premere ?l per la lista dei comandi.");
ShellFactory.createSubshell(
"round", shell, "Modifica del girone.",
new RoundCommands(repository)).commandLoop();
return "Menu home.";
}
示例4: simulation
import asg.cliche.ShellFactory; //导入依赖的package包/类
@Command(name = "simulation", description = "Accede ai comandi per creare delle simulazioni.")
public String simulation() throws IOException{
System.out.println("Avviata modifica del girone, premere ?l per la lista dei comandi.");
ShellFactory.createSubshell(
"sim", shell, "Comandi di simulazione risultati.",
new SimulationCommands(repository)).commandLoop();
return "Menu home.";
}
示例5: system
import asg.cliche.ShellFactory; //导入依赖的package包/类
@Command(name = "system", description = "Accede ai comandi per configurare il sistema.")
public String system() throws IOException{
System.out.println("Comandi di gestione dell'applicazione, premere ?l per la lista dei comandi.");
ShellFactory.createSubshell(
"sys", shell, "Comandi di sistema.",
new SystemCommands(repository)).commandLoop();
return "Menu home.";
}
示例6: main
import asg.cliche.ShellFactory; //导入依赖的package包/类
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
ShellFactory.createConsoleShell(
"Fitet Console",
"Benvenuti nella console FITeT \n" +
"Scrivere ?l per avere una lista dei comandi disponibili.",
new FitetCliche())
.commandLoop();
}
示例7: main
import asg.cliche.ShellFactory; //导入依赖的package包/类
public static void main(String[] args) throws IOException {
Shell cli = new Shell(new RunManager(), new CsvManager(), new Normalizer(), new Clusterer(), new HClusterer());
ShellFactory.createConsoleShell(
"Taukari",
"Welcome to Taukari. Current working directory is '" + rootDirectory
+ "' use the 'root-set' command to change it.", cli).commandLoop();
}
示例8: wallet
import asg.cliche.ShellFactory; //导入依赖的package包/类
@Command
public void wallet() throws Exception {
ShellFactory
.createSubshell(
"wallet",
theShell,
"Wallet Shell - Type '?l' for available commands, 'exit' to exit shell",
walletMgr).commandLoop();
}
示例9: client
import asg.cliche.ShellFactory; //导入依赖的package包/类
@Command
public void client() throws Exception {
ShellFactory
.createSubshell(
"client",
theShell,
"Mix Client Shell - Type '?l' for available commands, 'exit' to exit shell",
mixClient).commandLoop();
}
示例10: Interpreter
import asg.cliche.ShellFactory; //导入依赖的package包/类
public Interpreter(String file, boolean broadcastResults) throws Exception {
TradeDHT dht = new TomP2PDHT();
walletMgr = new WalletMgr(file);
mixClient = new MixClient(dht, walletMgr.getWallet(), walletMgr,
broadcastResults, false, new ChaumianBlinding(KeyGen.SECURE),
true);
ShellFactory
.createConsoleShell(
"bitprivacy",
"bitprivacy Shell - Type '?l' for available commands, 'exit' to exit shell",
this).commandLoop();
}
示例11: tx
import asg.cliche.ShellFactory; //导入依赖的package包/类
@Command(description = "Manually construct/manipulate transactions")
public void tx() throws IOException {
ShellFactory
.createSubshell(
"tx",
theShell,
"Tx Shell - Type '?l' for available commands, 'exit' to exit shell",
txCommands).commandLoop();
}
示例12: main
import asg.cliche.ShellFactory; //导入依赖的package包/类
public static void main(String... args) throws IOException {
MessageBoardCli cli = new MessageBoardCli();
cli.connect("inmem");
ShellFactory.createConsoleShell("messageboard", "The access key is 1234.", cli).commandLoop();
}
示例13: MineCloudCLI
import asg.cliche.ShellFactory; //导入依赖的package包/类
private MineCloudCLI() throws Exception {
MainHandler main = new MainHandler();
main.setCurrent(ShellFactory.createConsoleShell("minecloud", "MineCloud CLI", main));
main.currentShell().commandLoop();
}
示例14: main
import asg.cliche.ShellFactory; //导入依赖的package包/类
public static void main(String[] args) throws IOException, InterruptedException, OneDriveException {
ShellFactory.createConsoleShell("OneDrive",
"To list all available commands enter ?list or ?list-all, the latter will also show you system commands.\nTo get detailed info on a command enter ?help command-name",
new ConsoleClient()).commandLoop();
}
示例15: createConsoleShell
import asg.cliche.ShellFactory; //导入依赖的package包/类
protected Shell createConsoleShell() {
return ShellFactory.createConsoleShell(mavenProperties.getArtifactId(), getAppName(), this);
}