gov.llnl.babel

Class UserOptions.ServerSwitch

Enclosing Class:
UserOptions
Implemented Interfaces:
CommandLineSwitch

public class UserOptions.ServerSwitch
extends UserOptions.RequiredArgSwitch

Constructor Summary

ServerSwitch()

Method Summary

void
processCommandSwitch(String optarg)
This method is called when the Babel end user specifies this command line switch on the command line.

Methods inherited from class gov.llnl.babel.UserOptions.RequiredArgSwitch

getArgumentName, hasRequiredArgument

Methods inherited from class gov.llnl.babel.UserOptions.BasicSwitch

getArgumentName, getHelpText, getLongName, getShortForm, hasOptionalArgument, hasRequiredArgument, isHidden, setShortForm

Constructor Details

ServerSwitch

public ServerSwitch()

Method Details

processCommandSwitch

public final void processCommandSwitch(String optarg)
            throws InvalidArgumentException,
                   InvalidOptionException,
                   CorruptSymbolException
This method is called when the Babel end user specifies this command line switch on the command line.
Specified by:
processCommandSwitch in interface CommandLineSwitch
Parameters:
optarg - this argument will be null if the command line switch doesn't take a required argument (i.e., CommandLineSwitch.hasRequiredArgument() is false) or if the command line switch takes an optional argument (i.e., CommandLineSwitch.hasOptionalArgument() is true) and an argument wasn't provided; otherwise, the argument is a non-null string including the text from the command line.
Throws:
InvalidArgumentException - this indicates that the command line argument provided is wrong somehow. For example, if the argument should be an integer and the input isn't a valid integer, throw this exception.
InvalidOptionException - this indicates that the command line option itself is somehow wrong in the context of preceeding switches. For example, two switches may be mutually exclusive, so having both in a command line would cause the second switch to throw this exception.