00001
00025
package org.objectweb.cjdbc.console.text.module;
00026
00027
import org.objectweb.cjdbc.common.i18n.ConsoleTranslate;
00028
import org.objectweb.cjdbc.console.text.Console;
00029
import org.objectweb.cjdbc.console.text.commands.controller.AddDriver;
00030
import org.objectweb.cjdbc.console.text.commands.controller.Admin;
00031
import org.objectweb.cjdbc.console.text.commands.controller.Bind;
00032
import org.objectweb.cjdbc.console.text.commands.controller.Connect;
00033
import org.objectweb.cjdbc.console.text.commands.controller.GetInfo;
00034
import org.objectweb.cjdbc.console.text.commands.controller.GetXml;
00035
import org.objectweb.cjdbc.console.text.commands.controller.ListDatabases;
00036
import org.objectweb.cjdbc.console.text.commands.controller.Load;
00037
import org.objectweb.cjdbc.console.text.commands.controller.Monitor;
00038
import org.objectweb.cjdbc.console.text.commands.controller.RefreshLogs;
00039
import org.objectweb.cjdbc.console.text.commands.controller.Report;
00040
import org.objectweb.cjdbc.console.text.commands.controller.SaveConfiguration;
00041
import org.objectweb.cjdbc.console.text.commands.controller.Shutdown;
00042
00049 public class ControllerConsole extends AbstractConsoleModule
00050 {
00051
00057 public ControllerConsole(
Console console)
00058 {
00059 super(console);
00060 }
00061
00065 protected void loadCommands()
00066 {
00067 commands.add(
new AddDriver(
this));
00068 commands.add(
new RefreshLogs(
this));
00069 commands.add(
new Shutdown(
this));
00070 commands.add(
new GetXml(
this));
00071 commands.add(
new Report(
this));
00072 commands.add(
new SaveConfiguration(
this));
00073 commands.add(
new GetInfo(
this));
00074 commands.add(
new ListDatabases(
this));
00075 commands.add(
new Load(
this));
00076 commands.add(
new Admin(
this));
00077 commands.add(
new Bind(
this));
00078 commands.add(
new Connect(
this));
00079 commands.add(
new Monitor(
this));
00080 }
00081
00085 public void quit()
00086 {
00087
quit =
true;
00088 console.
println(
"");
00089 console.
println(
ConsoleTranslate.get(
"console.byebye"));
00090
00091 }
00092
00096 public String
getPromptString()
00097 {
00098
return console.
getJmxClient().
getRemoteName();
00099 }
00100
00104 public void login(String[] params)
00105 {
00106
00107 }
00108
00112 public String
getDescriptionString()
00113 {
00114
return "Controller";
00115 }
00116 }