当前位置: 首页>>代码示例>>Java>>正文


Java ShellFactory类代码示例

本文整理汇总了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();
}
 
开发者ID:LSTS,项目名称:imcjava,代码行数:26,代码来源:ImcShell.java

示例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);
    }
}
 
开发者ID:mkotb,项目名称:MineCloud,代码行数:9,代码来源:AbstractHandler.java

示例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.";        
}
 
开发者ID:corvinofrancesco,项目名称:FitetSpareggio,代码行数:9,代码来源:FitetCliche.java

示例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.";        
}
 
开发者ID:corvinofrancesco,项目名称:FitetSpareggio,代码行数:9,代码来源:FitetCliche.java

示例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.";        
}
 
开发者ID:corvinofrancesco,项目名称:FitetSpareggio,代码行数:9,代码来源:FitetCliche.java

示例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();  
}
 
开发者ID:corvinofrancesco,项目名称:FitetSpareggio,代码行数:12,代码来源:FitetCliche.java

示例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();
}
 
开发者ID:rdouyere,项目名称:taukari,代码行数:8,代码来源:Shell.java

示例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();
}
 
开发者ID:dustyneuron,项目名称:bitprivacy,代码行数:10,代码来源:Interpreter.java

示例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();
}
 
开发者ID:dustyneuron,项目名称:bitprivacy,代码行数:10,代码来源:Interpreter.java

示例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();
}
 
开发者ID:dustyneuron,项目名称:bitprivacy,代码行数:14,代码来源:Interpreter.java

示例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();
}
 
开发者ID:dustyneuron,项目名称:bitprivacy,代码行数:10,代码来源:WalletMgr.java

示例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();
}
 
开发者ID:sgo,项目名称:cucumber-demo,代码行数:6,代码来源:MessageBoardCli.java

示例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();
}
 
开发者ID:mkotb,项目名称:MineCloud,代码行数:7,代码来源:MineCloudCLI.java

示例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();

}
 
开发者ID:tawalaya,项目名称:OneDriveJavaSDK,代码行数:7,代码来源:ConsoleClient.java

示例15: createConsoleShell

import asg.cliche.ShellFactory; //导入依赖的package包/类
protected Shell createConsoleShell() {
  return ShellFactory.createConsoleShell(mavenProperties.getArtifactId(), getAppName(), this);
}
 
开发者ID:fxnn,项目名称:brainfuck-on-genetics,代码行数:4,代码来源:BrainfuckOnGeneticsShell.java


注:本文中的asg.cliche.ShellFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。