Public Member Functions | |
AddDriver (AbstractConsoleModule module) | |
void | parse (String commandText) throws IOException, ConsoleException |
String | getCommandName () |
String | getCommandDescription () |
String | getCommandParameters () |
Definition at line 43 of file AddDriver.java.
|
Creates a new
Definition at line 51 of file AddDriver.java. 00052 { 00053 super(module); 00054 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 133 of file AddDriver.java. 00134 { 00135 return ConsoleTranslate.get("controller.command.adddriver"); 00136 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 125 of file AddDriver.java. 00126 { 00127 return "addDriver"; 00128 }
|
|
Reimplemented from org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 141 of file AddDriver.java. 00142 { 00143 return "<driverPathName>"; 00144 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 59 of file AddDriver.java. References org.objectweb.cjdbc.console.jmx.RmiJmxClient.getControllerProxy(), org.objectweb.cjdbc.console.text.Console.println(), and org.objectweb.cjdbc.console.text.Console.readLine(). 00060 { 00061 String filename = null; 00062 // Get the file name if needed 00063 if (commandText == null || commandText.trim().equals("")) 00064 { 00065 try 00066 { 00067 filename = console.readLine(ConsoleTranslate 00068 .get("controller.command.adddriver.input.filename")); 00069 } 00070 catch (Exception che) 00071 { 00072 } 00073 } 00074 else 00075 filename = commandText.trim(); 00076 00077 if (filename == null || filename.equals("")) 00078 throw new ConsoleException(ConsoleTranslate 00079 .get("controller.command.adddriver.null.filename")); 00080 00081 try 00082 { 00083 // Send the file contents to the controller 00084 jmxClient.getControllerProxy().addDriver(readDriver(filename)); 00085 console.println(ConsoleTranslate.get( 00086 "controller.command.adddriver.file.sent", filename)); 00087 } 00088 catch (FileNotFoundException fnf) 00089 { 00090 throw new ConsoleException(ConsoleTranslate.get( 00091 "controller.command.adddriver.file.not.found", filename)); 00092 } 00093 catch (Exception ioe) 00094 { 00095 throw new ConsoleException(ConsoleTranslate.get( 00096 "controller.command.adddriver.sent.failed", ioe)); 00097 } 00098 }
|