stella.parameter
Class SwitchSkeleton.Turn

java.lang.Object
  extended by util.CommandLineParser
      extended by stella.parameter.SwitchSkeleton.Turn
Enclosing class:
SwitchSkeleton

public static class SwitchSkeleton.Turn
extends CommandLineParser

Allows rmi-access to the AbstractRemoteSwitch.switchOn(long), AbstractRemoteSwitch.switchOff(), and the #switchOnTimeout methods. Uses a command line parser for access.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.CommandLineParser
CommandLineParser.Test
 
Field Summary
(package private) static SwitchSkeleton.Turn access
          The access instance of this class.
(package private) static String FOOT
          A footer message.
(package private) static String SWITCHES
          The switches for light on/off.
(package private) static String TIME
          The switch for turning the light on for a certain maximum time.
(package private) static Map USE
          The detailed user of the switches.
 
Constructor Summary
protected SwitchSkeleton.Turn()
          Constructs the command line parser instance used with this class.
 
Method Summary
static void main(String[] arg)
          The entry point for turning the light on or off.
(package private)  boolean process(String[] arg)
          Processes the command line.
 
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

access

static SwitchSkeleton.Turn access
The access instance of this class.


SWITCHES

static final String SWITCHES
The switches for light on/off.

See Also:
Constant Field Values

TIME

static final String TIME
The switch for turning the light on for a certain maximum time.

See Also:
Constant Field Values

USE

static final Map USE
The detailed user of the switches.


FOOT

static final String FOOT
A footer message.

See Also:
Constant Field Values
Constructor Detail

SwitchSkeleton.Turn

protected SwitchSkeleton.Turn()
Constructs the command line parser instance used with this class.

Method Detail

process

boolean process(String[] arg)
          throws ParseException
Processes the command line. Note that removing a sensor from the weather station does not kill the sensor itself, so it will continue to spread data, until its binding is invalidated (i.e. replaced).

Throws:
ParseException

main

public static void main(String[] arg)
                 throws ParseException
The entry point for turning the light on or off.

Throws:
ParseException