Public Member Functions | |
ChangeTarget (MonitorConsole module) | |
void | parse (String commandText) throws Exception |
String | getCommandName () |
String | getCommandDescription () |
Definition at line 37 of file ChangeTarget.java.
|
Creates a new
Definition at line 45 of file ChangeTarget.java. 00046 { 00047 super(module); 00048 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 91 of file ChangeTarget.java. 00092 { 00093 return ConsoleTranslate.get("monitor.command.settarget"); 00094 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 83 of file ChangeTarget.java. 00084 { 00085 return "setTarget"; 00086 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 53 of file ChangeTarget.java. References org.objectweb.cjdbc.console.jmx.RmiJmxClient.getDataCollectorProxy(), org.objectweb.cjdbc.console.jmx.RmiJmxClient.getRemoteName(), org.objectweb.cjdbc.console.text.Console.printError(), and org.objectweb.cjdbc.console.text.module.MonitorConsole.setCurrentTarget(). 00054 { 00055 try 00056 { 00057 String target = commandText.trim(); 00058 String possibleTarget = target.trim(); 00059 if (target == null || target.equals("")) 00060 { 00061 module.setCurrentTarget(jmxClient.getRemoteName()); 00062 } else 00063 { 00064 if (jmxClient.getDataCollectorProxy() 00065 .hasVirtualDatabase(possibleTarget)) 00066 { 00067 // change the target for all commands 00068 module.setCurrentTarget(possibleTarget); 00069 } else 00070 console.printError(ConsoleTranslate.get( 00071 "module.database.invalid", possibleTarget)); 00072 } 00073 } catch (Exception e) 00074 { 00075 throw new ConsoleException("monitor.command.settarget.failed",e); 00076 } 00077 00078 }
|