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

org.objectweb.cjdbc.console.text.commands.controller.Shutdown Class Reference

Inheritance diagram for org.objectweb.cjdbc.console.text.commands.controller.Shutdown:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Shutdown (AbstractConsoleModule module)
void parse (String commandText) throws IOException, ConsoleException
String getCommandName ()
String getCommandParameters ()
String getCommandDescription ()

Detailed Description

This class defines a Shutdown

Author:
Nicolas Modrzyk

Mathieu Peltier

Emmanuel Cecchet

Version:
1.0

Definition at line 44 of file Shutdown.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.text.commands.controller.Shutdown.Shutdown AbstractConsoleModule  module  ) 
 

Creates a new Shutdown.java object

Parameters:
module the command is attached to

Definition at line 52 of file Shutdown.java.

00053   {
00054     super(module);
00055   }


Member Function Documentation

String org.objectweb.cjdbc.console.text.commands.controller.Shutdown.getCommandDescription  )  [virtual]
 

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

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

Definition at line 105 of file Shutdown.java.

00106   {
00107     return ConsoleTranslate.get("controller.command.shutdown");
00108   }

String org.objectweb.cjdbc.console.text.commands.controller.Shutdown.getCommandName  )  [virtual]
 

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

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

Definition at line 89 of file Shutdown.java.

00090   {
00091     return "shutdown";
00092   }

String org.objectweb.cjdbc.console.text.commands.controller.Shutdown.getCommandParameters  ) 
 

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

Reimplemented from org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 97 of file Shutdown.java.

00098   {
00099     return "[mode]";
00100   }

void org.objectweb.cjdbc.console.text.commands.controller.Shutdown.parse String  commandText  )  throws IOException, ConsoleException [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 60 of file Shutdown.java.

References org.objectweb.cjdbc.console.jmx.RmiJmxClient.getControllerProxy(), org.objectweb.cjdbc.console.jmx.RmiJmxClient.isValidConnection(), org.objectweb.cjdbc.console.text.Console.printError(), org.objectweb.cjdbc.console.text.Console.printInfo(), and org.objectweb.cjdbc.console.text.Console.println().

00061   {
00062     try
00063     {
00064       if (commandText.indexOf(String.valueOf(Constants.SHUTDOWN_SAFE)) != -1)
00065         jmxClient.getControllerProxy().shutdown(Constants.SHUTDOWN_SAFE);
00066       else if (commandText.indexOf(String.valueOf(Constants.SHUTDOWN_WAIT)) != -1)
00067         jmxClient.getControllerProxy().shutdown(Constants.SHUTDOWN_WAIT);
00068       else if (commandText.indexOf(String.valueOf(Constants.SHUTDOWN_FORCE)) != -1)
00069         jmxClient.getControllerProxy().shutdown(Constants.SHUTDOWN_FORCE);
00070       else
00071         // Defaults to safe mode
00072         jmxClient.getControllerProxy().shutdown(Constants.SHUTDOWN_SAFE);
00073 
00074       console.println("Shutdown was complete");
00075     }
00076     catch (Exception e)
00077     {
00078       if (jmxClient.isValidConnection())
00079         console.printError("Could not shutdown the controller:"
00080             + e.getMessage());
00081       else
00082         console.printInfo("Controller has shutdown");
00083     }
00084   }


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