de.uniba.wiai.lspi.chord.console.command
Class Insert

java.lang.Object
  extended by de.uniba.wiai.lspi.util.console.Command
      extended by de.uniba.wiai.lspi.chord.console.command.Insert

public class Insert
extends Command

Command to insert a value from a specified node into the local chord network. To get a description of this command type insert -help into the console.


Field Summary
static String COMMAND_NAME
          Name of this command.
protected static String KEY_PARAM
          The name of the parameter, that defines the key for the value to insert.
protected static String NODE_PARAM
          The name of the parameter, that defines the name of the node, from that the value should be inserted.
protected static String VALUE_PARAM
          The name of the parameter, that defines the value, which is inserted into the distributed hash table.
 
Fields inherited from class de.uniba.wiai.lspi.util.console.Command
HELP_ARG1, HELP_ARG2, out, parameters, toCommand
 
Constructor Summary
Insert(Object[] toCommand1, PrintStream out1)
          Creates a new instance of Insert
 
Method Summary
 void exec()
          To be overwritten by subclasses for command execution.
 String getCommandName()
          Return the name of the command.
 void printOutHelp()
          To be overwritten.
 
Methods inherited from class de.uniba.wiai.lspi.util.console.Command
addParameter, execute, setParameters, setPrintStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMAND_NAME

public static final String COMMAND_NAME
Name of this command.

See Also:
Constant Field Values

NODE_PARAM

protected static final String NODE_PARAM
The name of the parameter, that defines the name of the node, from that the value should be inserted.

See Also:
Constant Field Values

KEY_PARAM

protected static final String KEY_PARAM
The name of the parameter, that defines the key for the value to insert.

See Also:
Constant Field Values

VALUE_PARAM

protected static final String VALUE_PARAM
The name of the parameter, that defines the value, which is inserted into the distributed hash table.

See Also:
Constant Field Values
Constructor Detail

Insert

public Insert(Object[] toCommand1,
              PrintStream out1)
Creates a new instance of Insert

Parameters:
toCommand1 -
out1 -
Method Detail

exec

public void exec()
          throws ConsoleException
Description copied from class: Command
To be overwritten by subclasses for command execution. The work of a command implementation is done in this method.

Specified by:
exec in class Command
Throws:
ConsoleException - Exception during execution.

getCommandName

public String getCommandName()
Description copied from class: Command
Return the name of the command. Must not contain spaces. To be overwritten by subclasses.

Specified by:
getCommandName in class Command
Returns:
The commands name. For example: exit.

printOutHelp

public void printOutHelp()
Description copied from class: Command
To be overwritten. Display the help text of the Command.

Specified by:
printOutHelp in class Command


Copyright © 2004-2008 Karsten Loesing, Sven Kaffille - Distributed and Mobile Systems Group, Lehrstuhl für Praktische Informatik, Universität Bamberg. All Rights Reserved.