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

org.objectweb.cjdbc.console.text.commands.monitor.ChangeTarget Class Reference

Inheritance diagram for org.objectweb.cjdbc.console.text.commands.monitor.ChangeTarget:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.cjdbc.console.text.commands.monitor.ChangeTarget:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ChangeTarget (MonitorConsole module)
void parse (String commandText) throws Exception
String getCommandName ()
String getCommandDescription ()

Detailed Description

This class defines a ChangeTarget

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 37 of file ChangeTarget.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.text.commands.monitor.ChangeTarget.ChangeTarget MonitorConsole  module  ) 
 

Creates a new ChangeTarget.java object

Parameters:
module monitoring module

Definition at line 45 of file ChangeTarget.java.

00046   {
00047     super(module);
00048   }


Member Function Documentation

String org.objectweb.cjdbc.console.text.commands.monitor.ChangeTarget.getCommandDescription  )  [virtual]
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandDescription()

Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 91 of file ChangeTarget.java.

00092   {
00093     return ConsoleTranslate.get("monitor.command.settarget");
00094   }

String org.objectweb.cjdbc.console.text.commands.monitor.ChangeTarget.getCommandName  )  [virtual]
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandName()

Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 83 of file ChangeTarget.java.

00084   {
00085     return "setTarget";
00086   }

void org.objectweb.cjdbc.console.text.commands.monitor.ChangeTarget.parse String  commandText  )  throws Exception [virtual]
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.parse(java.lang.String)

Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 53 of file ChangeTarget.java.

References org.objectweb.cjdbc.console.jmx.RmiJmxClient.getDataCollectorProxy(), org.objectweb.cjdbc.console.jmx.RmiJmxClient.getRemoteName(), org.objectweb.cjdbc.console.text.Console.printError(), and org.objectweb.cjdbc.console.text.module.MonitorConsole.setCurrentTarget().

00054   {
00055     try
00056     {
00057       String target = commandText.trim();
00058       String possibleTarget = target.trim();
00059       if (target == null || target.equals(""))
00060       {
00061         module.setCurrentTarget(jmxClient.getRemoteName());
00062       } else
00063       {
00064         if (jmxClient.getDataCollectorProxy()
00065             .hasVirtualDatabase(possibleTarget))
00066         {
00067           // change the target for all commands
00068           module.setCurrentTarget(possibleTarget);
00069         } else
00070           console.printError(ConsoleTranslate.get(
00071               "module.database.invalid", possibleTarget));
00072       }
00073     } catch (Exception e)
00074     {
00075       throw new ConsoleException("monitor.command.settarget.failed",e);
00076     }
00077 
00078   }


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