Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.console.text.module.MonitorConsole Class Reference

Inheritance diagram for org.objectweb.cjdbc.console.text.module.MonitorConsole:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.cjdbc.console.text.module.MonitorConsole:

Collaboration graph
[legend]
List of all members.

Public Member Functions

String getCurrentTarget ()
void setCurrentTarget (String currentTarget)
 MonitorConsole (Console console)
String getDescriptionString ()
String getPromptString ()
void login (String[] params)

Protected Member Functions

void loadCommands ()

Detailed Description

Monitoring console to retrieve information from the controller.

Author:
Nicolas Modrzyk

Mathieu Peltier

Definition at line 48 of file MonitorConsole.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.text.module.MonitorConsole.MonitorConsole Console  console  ) 
 

Creates a new VirtualDatabaseAdmin instance.

Parameters:
console console console

Definition at line 88 of file MonitorConsole.java.

00089   {
00090     super(console);
00091   }


Member Function Documentation

String org.objectweb.cjdbc.console.text.module.MonitorConsole.getCurrentTarget  ) 
 

Returns the currentTarget value.

Returns:
Returns the currentTarget.

Definition at line 58 of file MonitorConsole.java.

00059   {
00060     return currentTarget;
00061   }

String org.objectweb.cjdbc.console.text.module.MonitorConsole.getDescriptionString  )  [virtual]
 

See also:
org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.getDescriptionString()

Implements org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.

Definition at line 96 of file MonitorConsole.java.

00097   {
00098     return "Monitoring";
00099   }

String org.objectweb.cjdbc.console.text.module.MonitorConsole.getPromptString  )  [virtual]
 

See also:
org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.getPromptString()

Implements org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.

Definition at line 104 of file MonitorConsole.java.

00105   {
00106     return "Monitoring:" + currentTarget;
00107   }

void org.objectweb.cjdbc.console.text.module.MonitorConsole.loadCommands  )  [protected, virtual]
 

See also:
org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.loadCommands()

Implements org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.

Definition at line 112 of file MonitorConsole.java.

00113   {
00114     commands.add(new ChangeTarget(this));
00115     commands.add(new ShowBackends(this));
00116     commands.add(new ShowCache(this));
00117     commands.add(new ShowCacheStats(this));
00118     commands.add(new ShowController(this));
00119     commands.add(new ShowDatabases(this));
00120     commands.add(new ShowScheduler(this));
00121     commands.add(new ShowStats(this));
00122     commands.add(new ShowRecoveryLog(this));
00123   }

void org.objectweb.cjdbc.console.text.module.MonitorConsole.login String[]  params  )  [virtual]
 

See also:
org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.login(java.lang.String[])

Implements org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.

Definition at line 128 of file MonitorConsole.java.

References org.objectweb.cjdbc.console.text.Console.printError().

Referenced by org.objectweb.cjdbc.console.text.commands.controller.Monitor.parse().

00129   {
00130     String command = (params.length > 0 && params[0] != null) ? params[0] : "";
00131     if (command.equals("") == false)
00132     {
00133       try
00134       {
00135         new ChangeTarget(this).execute(params[0]);
00136       }
00137       catch (Exception e)
00138       {
00139         console.printError(e.getMessage(), e);
00140         quit = true;
00141       }
00142     }
00143     else
00144     {
00145       console.printError(ConsoleTranslate.get("module.database.invalid", ""));
00146       quit = true;
00147     }
00148   }

void org.objectweb.cjdbc.console.text.module.MonitorConsole.setCurrentTarget String  currentTarget  ) 
 

Sets the currentTarget value.

Parameters:
currentTarget The currentTarget to set.

Definition at line 68 of file MonitorConsole.java.

Referenced by org.objectweb.cjdbc.console.text.commands.monitor.ChangeTarget.parse().

00069   {
00070     this.currentTarget = currentTarget;
00071     Object o;
00072     Iterator it = commands.iterator();
00073     while (it.hasNext())
00074     {
00075       o = it.next();
00076       if (o instanceof AbstractMonitorCommand)
00077       {
00078         ((AbstractMonitorCommand) o).setCurrentTarget(currentTarget);
00079       }
00080     }
00081   }


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:03:10 2005 for C-JDBC by  doxygen 1.3.9.1