stella.util
Class SchedulerAccess

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

public class SchedulerAccess
extends CommandLineParser

Allows command line access to a remote SchedulerControlling interface, in particular it allows adding and removing targets as well as updating of certain properties.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.CommandLineParser
CommandLineParser.Test
 
Field Summary
static String FOOT
          A footer usage message.
static String ONESWITCHES
          The command line switches understood by this access class, one arg.
static String TWOSWITCHES
          The command line switches understood by this access class, two arg.
static Map USE
          The usage map.
static String ZEROSWITCHES
          The command line switches understood by this class with no arg.
 
Constructor Summary
SchedulerAccess()
          Constructs a new camera access instance.
 
Method Summary
static void main(String[] arg)
          Parses the command line arguments and procceed with transfering to a registry-bound target list.
private static void printList(List l)
          Prints the list, item by item on a line.
private  Remote processOn()
          Process the command line arguments, when parsing was already done.
protected  boolean processSwitches(SchedulerControlling master)
          Process the command line switches found.
 
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

ZEROSWITCHES

public static final String ZEROSWITCHES
The command line switches understood by this class with no arg.

See Also:
Constant Field Values

ONESWITCHES

public static final String ONESWITCHES
The command line switches understood by this access class, one arg.

See Also:
Constant Field Values

TWOSWITCHES

public static final String TWOSWITCHES
The command line switches understood by this access class, two arg.

See Also:
Constant Field Values

USE

public static Map USE
The usage map.


FOOT

public static final String FOOT
A footer usage message.

See Also:
Constant Field Values
Constructor Detail

SchedulerAccess

public SchedulerAccess()
Constructs a new camera access instance. The switches understood are readily added to the command line parser.

Method Detail

processOn

private Remote processOn()
Process the command line arguments, when parsing was already done.


processSwitches

protected boolean processSwitches(SchedulerControlling master)
                           throws ParseException,
                                  TransformerException
Process the command line switches found. If the remote reference handed over is a ListenerControlling and one of the switches defined in ONESWITCHES is given, the appropriate method of the listener control is called. Note that the command line must be parsed before calling this method.
Implementation note: If both processable arguments, -r and -d are given, the deregistering at the caster is processed first.

Returns:
True on success.
Throws:
ParseException
TransformerException

printList

private static final void printList(List l)
Prints the list, item by item on a line.


main

public static void main(String[] arg)
                 throws Exception
Parses the command line arguments and procceed with transfering to a registry-bound target list. Issue without arguments to get a short usage help.

Throws:
Exception