Public Member Functions | |
Shutdown (AbstractConsoleModule module) | |
void | parse (String commandText) throws IOException, ConsoleException |
String | getCommandName () |
String | getCommandParameters () |
String | getCommandDescription () |
Definition at line 44 of file Shutdown.java.
|
Creates a new
Definition at line 52 of file Shutdown.java. 00053 { 00054 super(module); 00055 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 105 of file Shutdown.java. 00106 { 00107 return ConsoleTranslate.get("controller.command.shutdown"); 00108 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 89 of file Shutdown.java. 00090 { 00091 return "shutdown"; 00092 }
|
|
Reimplemented from org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 97 of file Shutdown.java. 00098 { 00099 return "[mode]"; 00100 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 60 of file Shutdown.java. References org.objectweb.cjdbc.console.jmx.RmiJmxClient.getControllerProxy(), org.objectweb.cjdbc.console.jmx.RmiJmxClient.isValidConnection(), org.objectweb.cjdbc.console.text.Console.printError(), org.objectweb.cjdbc.console.text.Console.printInfo(), and org.objectweb.cjdbc.console.text.Console.println(). 00061 { 00062 try 00063 { 00064 if (commandText.indexOf(String.valueOf(Constants.SHUTDOWN_SAFE)) != -1) 00065 jmxClient.getControllerProxy().shutdown(Constants.SHUTDOWN_SAFE); 00066 else if (commandText.indexOf(String.valueOf(Constants.SHUTDOWN_WAIT)) != -1) 00067 jmxClient.getControllerProxy().shutdown(Constants.SHUTDOWN_WAIT); 00068 else if (commandText.indexOf(String.valueOf(Constants.SHUTDOWN_FORCE)) != -1) 00069 jmxClient.getControllerProxy().shutdown(Constants.SHUTDOWN_FORCE); 00070 else 00071 // Defaults to safe mode 00072 jmxClient.getControllerProxy().shutdown(Constants.SHUTDOWN_SAFE); 00073 00074 console.println("Shutdown was complete"); 00075 } 00076 catch (Exception e) 00077 { 00078 if (jmxClient.isValidConnection()) 00079 console.printError("Could not shutdown the controller:" 00080 + e.getMessage()); 00081 else 00082 console.printInfo("Controller has shutdown"); 00083 } 00084 }
|