stella.util
Class ClusterAccess

java.lang.Object
  extended by util.CommandLineParser
      extended by stella.util.ClusterAccess

public class ClusterAccess
extends CommandLineParser

A tiny helper class that dumps the value of the stated parameter to the command line.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.CommandLineParser
CommandLineParser.Test
 
Field Summary
private static String FOOT
          The footer message.
static String ONESWITCHES
          The recognized switches with one argument.
static String TWOSWITCHES
          The recognized switches with one argument.
private static Map USE
          The usage map.
static String ZEROSWITCHES
          The recognized switches with zero argument.
 
Constructor Summary
ClusterAccess()
          Constructs a new parameter cluster dump instance.
 
Method Summary
static void main(String[] arg)
          Performs a look-up operation on the binding name stated on the command line.
 boolean process(String[] arg)
          Processes the command line arguments.
 
Methods inherited from class util.CommandLineParser
getArguments, getCommandLine, getCommands, getRegisteredSwitches, hasAnySwitch, hasSwitch, hasSwitch, haveAllSwitches, parse, printCommandLine, registerLine, registerSwitches, setCommands, staticUsage, usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TWOSWITCHES

public static final String TWOSWITCHES
The recognized switches with one argument.

See Also:
Constant Field Values

ONESWITCHES

public static final String ONESWITCHES
The recognized switches with one argument.

See Also:
Constant Field Values

ZEROSWITCHES

public static final String ZEROSWITCHES
The recognized switches with zero argument.

See Also:
Constant Field Values

USE

private static final Map USE
The usage map.


FOOT

private static final String FOOT
The footer message.

See Also:
Constant Field Values
Constructor Detail

ClusterAccess

public ClusterAccess()
Constructs a new parameter cluster dump instance. The command line switches understood are registered here.

Method Detail

process

public boolean process(String[] arg)
                throws ParseException
Processes the command line arguments. After parsing, there must be a single reference to the binding name of an RmiParameterClustering instance (i.e. a single unmatched command parameter). This name is resolved into a reference to the parameter cluster to query. The both command-line switches understood either dump the entire set of parameter names to System.out (switch '-d') or query the value of a single parameter (switch '-q').

Returns:
True, if the request could be fulfilled.
Throws:
ParseException

main

public static void main(String[] arg)
                 throws ParseException
Performs a look-up operation on the binding name stated on the command line. If there is a valid binding and it binds a RmiParameterClustering instance either a single value is queried or the names of all parameters hosted are dumped to the command line.

Throws:
ParseException