1 24 25 package org.objectweb.cjdbc.console.text.commands.dbadmin; 26 27 import java.util.ArrayList ; 28 29 import org.objectweb.cjdbc.common.i18n.ConsoleTranslate; 30 import org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean; 31 import org.objectweb.cjdbc.console.text.module.VirtualDatabaseAdmin; 32 33 39 public class ViewCheckpointNames extends AbstractAdminCommand 40 { 41 42 47 public ViewCheckpointNames(VirtualDatabaseAdmin module) 48 { 49 super(module); 50 } 51 52 55 public void parse(String commandText) throws Exception 56 { 57 console.println(ConsoleTranslate.get("admin.command.view.checkpoints.echo", 58 dbName)); 59 VirtualDatabaseMBean vdjc = jmxClient.getVirtualDatabaseProxy(dbName, user, 60 password); 61 ArrayList list = vdjc.viewCheckpointNames(); 62 for (int i = 0; i < list.size(); i++) 63 console.println("[" + i + "]\t" + list.get(i)); 64 } 65 66 69 public String getCommandName() 70 { 71 return "show checkpoints"; 72 } 73 74 77 public String getCommandDescription() 78 { 79 return ConsoleTranslate.get("admin.command.view.checkpoints.description"); 80 } 81 82 } | Popular Tags |