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

org.objectweb.cjdbc.console.text.commands.dbadmin.DisableWrite Class Reference

Inheritance diagram for org.objectweb.cjdbc.console.text.commands.dbadmin.DisableWrite:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DisableWrite (VirtualDatabaseAdmin module)
void parse (String commandText) throws Exception
String getCommandName ()
String getCommandDescription ()
String getCommandParameters ()

Detailed Description

This class defines a DisableWrite

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 40 of file DisableWrite.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.text.commands.dbadmin.DisableWrite.DisableWrite VirtualDatabaseAdmin  module  ) 
 

Creates a new DisableWrite object

Parameters:
module owning module

Definition at line 48 of file DisableWrite.java.

00049   {
00050     super(module);
00051   }


Member Function Documentation

String org.objectweb.cjdbc.console.text.commands.dbadmin.DisableWrite.getCommandDescription  )  [virtual]
 

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

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

Definition at line 86 of file DisableWrite.java.

00087   {
00088     return ConsoleTranslate.get("admin.command.disable.write");
00089   }

String org.objectweb.cjdbc.console.text.commands.dbadmin.DisableWrite.getCommandName  )  [virtual]
 

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

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

Definition at line 78 of file DisableWrite.java.

00079   {
00080     return "disableWrite";
00081   }

String org.objectweb.cjdbc.console.text.commands.dbadmin.DisableWrite.getCommandParameters  ) 
 

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

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

Definition at line 94 of file DisableWrite.java.

00095   {
00096     return "<backendName> [<checkpoint>]";
00097   }

void org.objectweb.cjdbc.console.text.commands.dbadmin.DisableWrite.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 56 of file DisableWrite.java.

References org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.disableWrite(), org.objectweb.cjdbc.console.jmx.RmiJmxClient.getDatabaseBackendProxy(), org.objectweb.cjdbc.console.text.Console.println(), and org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.setLastKnownCheckpoint().

00057   {
00058     StringTokenizer st = new StringTokenizer(commandText);
00059     if (st.countTokens() < 1 || st.countTokens() > 2)
00060       throw new ConsoleException(ConsoleTranslate
00061           .get("console.error.invalid.comment.argument"));
00062     String backendName = st.nextToken();
00063     String checkpoint = null;
00064     if (st.hasMoreTokens())
00065       checkpoint = st.nextToken();
00066     console.println(ConsoleTranslate.get("admin.command.disable.write.echo",
00067         backendName));
00068     DatabaseBackendMBean mbean = jmxClient.getDatabaseBackendProxy(dbName,
00069         backendName, user, password);
00070     mbean.disableWrite();
00071     if (checkpoint != null)
00072       mbean.setLastKnownCheckpoint(checkpoint);
00073   }


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