Public Member Functions | |
Enable (VirtualDatabaseAdmin module) | |
void | parse (String commandText) throws Exception |
String | getCommandName () |
String | getCommandDescription () |
String | getCommandParameters () |
Definition at line 40 of file Enable.java.
|
Creates a new
Definition at line 48 of file Enable.java. 00049 { 00050 super(module); 00051 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 101 of file Enable.java. 00102 { 00103 return ConsoleTranslate.get("admin.command.enable"); 00104 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 92 of file Enable.java. 00093 { 00094 00095 return "enable"; 00096 }
|
|
Reimplemented from org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 109 of file Enable.java. 00110 { 00111 return "<backend> [<checkpoint>]"; 00112 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 56 of file Enable.java. References org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.enableBackend(), org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.enableBackendFromCheckpoint(), org.objectweb.cjdbc.console.jmx.RmiJmxClient.getVirtualDatabaseProxy(), and org.objectweb.cjdbc.console.text.Console.println(). 00057 { 00058 String checkpoint = null; 00059 String backendName = null; 00060 StringTokenizer st = new StringTokenizer(commandText.trim()); 00061 00062 try 00063 { 00064 backendName = st.nextToken(); 00065 } 00066 catch (Exception e) 00067 { 00068 throw new ConsoleException("admin.command.enable.need.backend"); 00069 } 00070 if (st.hasMoreTokens()) 00071 checkpoint = st.nextToken(); 00072 VirtualDatabaseMBean vdjc = jmxClient.getVirtualDatabaseProxy(dbName, user, 00073 password); 00074 if (checkpoint == null) 00075 { 00076 console.println(ConsoleTranslate.get( 00077 "admin.command.enable.no.checkpoint", backendName)); 00078 vdjc.enableBackend(backendName); 00079 } 00080 else 00081 { 00082 console.println(ConsoleTranslate.get( 00083 "admin.command.enable.with.checkpoint", new String[]{backendName, 00084 checkpoint})); 00085 vdjc.enableBackendFromCheckpoint(backendName); 00086 } 00087 }
|