1 24 25 package org.objectweb.cjdbc.console.text.commands.controller; 26 27 import java.io.IOException ; 28 29 import org.objectweb.cjdbc.common.i18n.ConsoleTranslate; 30 import org.objectweb.cjdbc.console.text.ConsoleException; 31 import org.objectweb.cjdbc.console.text.commands.ConsoleCommand; 32 import org.objectweb.cjdbc.console.text.module.AbstractConsoleModule; 33 34 40 public class RefreshLogs extends ConsoleCommand 41 { 42 43 48 public RefreshLogs(AbstractConsoleModule module) 49 { 50 super(module); 51 } 52 53 56 public void parse(String commandText) throws IOException , ConsoleException 57 { 58 try 59 { 60 jmxClient.getControllerProxy().refreshLogConfiguration(); 61 console.printInfo(ConsoleTranslate 62 .get("controller.command.refresh.logs.completed")); 63 } 64 catch (Exception e) 65 { 66 throw new ConsoleException(ConsoleTranslate.get( 67 "controller.command.refresh.logs.failed", e)); 68 } 69 70 } 71 72 75 public String getCommandName() 76 { 77 return "reload logging configuration"; 78 } 79 80 83 public String getCommandDescription() 84 { 85 return ConsoleTranslate.get("controller.command.refresh.logs.description"); 86 } 87 } 88 | Popular Tags |