1 23 24 package org.continuent.sequoia.console.text.commands.controller; 25 26 import java.io.IOException ; 27 28 import org.continuent.sequoia.common.i18n.ConsoleTranslate; 29 import org.continuent.sequoia.console.text.ConsoleException; 30 import org.continuent.sequoia.console.text.commands.ConsoleCommand; 31 import org.continuent.sequoia.console.text.module.AbstractConsoleModule; 32 33 42 public class Shutdown extends ConsoleCommand 43 { 44 45 50 public Shutdown(AbstractConsoleModule module) 51 { 52 super(module); 53 } 54 55 58 public void parse(String commandText) throws IOException , ConsoleException 59 { 60 checkJmxConnectionToController(); 61 try 62 { 63 jmxClient.getControllerProxy().shutdown(); 64 65 console.printInfo("Shutdown was complete"); 66 } 67 catch (Exception e) 68 { 69 console.printError("Could not shutdown the controller", e); 70 } 71 } 72 73 76 public String getCommandName() 77 { 78 return "shutdown"; } 80 81 84 public String getCommandDescription() 85 { 86 return ConsoleTranslate.get("controller.command.shutdown"); } 88 } | Popular Tags |