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