src/org/objectweb/cjdbc/console/text/commands/ConsoleCommand.java

説明を見る。
00001 00025 package org.objectweb.cjdbc.console.text.commands; 00026 00027 import org.objectweb.cjdbc.common.i18n.ConsoleTranslate; 00028 import org.objectweb.cjdbc.console.jmx.RmiJmxClient; 00029 import org.objectweb.cjdbc.console.text.Console; 00030 import org.objectweb.cjdbc.console.text.ConsoleException; 00031 import org.objectweb.cjdbc.console.text.module.AbstractConsoleModule; 00032 00040 public abstract class ConsoleCommand implements Comparable 00041 { 00042 protected Console console; 00043 protected RmiJmxClient jmxClient; 00044 protected AbstractConsoleModule module; 00045 00051 public ConsoleCommand(AbstractConsoleModule module) 00052 { 00053 this.console = module.getConsole(); 00054 this.module = module; 00055 jmxClient = console.getJmxClient(); 00056 } 00057 00061 public int compareTo(Object o) 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 } 00073 00081 public abstract void parse(String commandText) throws Exception; 00082 00089 public void execute(String commandText) throws Exception 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 } 00105 00111 public abstract String getCommandName(); 00112 00119 public String getCommandParameters() 00120 { 00121 return ""; 00122 } 00123 00129 public abstract String getCommandDescription(); 00130 }

CJDBCversion1.0.4に対してTue Oct 12 15:15:59 2004に生成されました。 doxygen 1.3.8