Public Member Functions | |
ConsoleCommand (AbstractConsoleModule module) | |
int | compareTo (Object o) |
abstract void | parse (String commandText) throws Exception |
void | execute (String commandText) throws Exception |
abstract String | getCommandName () |
String | getCommandParameters () |
abstract String | getCommandDescription () |
Protected Attributes | |
Console | console |
RmiJmxClient | jmxClient |
AbstractConsoleModule | module |
Definition at line 40 of file ConsoleCommand.java.
|
Creates a new
Definition at line 51 of file ConsoleCommand.java. References org.objectweb.cjdbc.console.text.Console.getJmxClient(). 00052 { 00053 this.console = module.getConsole(); 00054 this.module = module; 00055 jmxClient = console.getJmxClient(); 00056 }
|
|
Definition at line 61 of file ConsoleCommand.java. References org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandName(). 00062 { 00063 if (o instanceof ConsoleCommand) 00064 { 00065 ConsoleCommand c = (ConsoleCommand) o; 00066 return getCommandName().compareTo(c.getCommandName()); 00067 } 00068 else 00069 { 00070 throw new IllegalArgumentException(); 00071 } 00072 }
|
|
Check if the JMX connection is still valid. Otherwise reconnect.
Reimplemented in org.objectweb.cjdbc.console.text.commands.Help, org.objectweb.cjdbc.console.text.commands.Native, and org.objectweb.cjdbc.console.text.commands.Quit. Definition at line 89 of file ConsoleCommand.java. References org.objectweb.cjdbc.console.text.commands.ConsoleCommand.parse(). Referenced by org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.handleCommandLine(). 00090 { 00091 if (!jmxClient.isValidConnection()) 00092 { 00093 try 00094 { 00095 jmxClient.reconnect(); 00096 } 00097 catch (Exception e) 00098 { 00099 throw new ConsoleException(ConsoleTranslate 00100 .get("jmx.server.connection.lost")); 00101 } 00102 } 00103 parse(commandText); 00104 }
|
|
|
|
|