stella.sensor
Class WeatherStation.Manage

java.lang.Object
  extended by util.CommandLineParser
      extended by stella.sensor.WeatherStation.Manage
Enclosing class:
WeatherStation

public static final class WeatherStation.Manage
extends CommandLineParser

Allows rmi-access to the add/remove sensor properties of the weather station. Use this class without arguments to get a usage message.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.CommandLineParser
CommandLineParser.Test
 
Field Summary
(package private) static WeatherStation.Manage access
          The access instance of this class.
private static String DEFBINDNAME
          The default bindname used for rmi-access to the weather station.
(package private) static String DUMP
          The switch for dumping all sensor names to system.out.
(package private) static String FOOT
          A footer message.
(package private) static String SWITCHES
          The switches for removing and adding a sensor.
(package private) static Map USE
          The detailed user of the switches.
 
Constructor Summary
protected WeatherStation.Manage()
          Constructs the command line parser instance used with this class.
 
Method Summary
static void main(String[] arg)
          The entry point for the adding/removing sensors from the weather station.
(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

DEFBINDNAME

private static final String DEFBINDNAME
The default bindname used for rmi-access to the weather station.

See Also:
Constant Field Values

access

static WeatherStation.Manage access
The access instance of this class.


SWITCHES

static final String SWITCHES
The switches for removing and adding a sensor.

See Also:
Constant Field Values

DUMP

static final String DUMP
The switch for dumping all sensor names to system.out.

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

WeatherStation.Manage

protected WeatherStation.Manage()
Constructs the command line parser instance used with this class.

Method Detail

process

boolean process(String[] arg)
          throws ParseException
Processes the command line. If no binding name is explicetly given, the add/remove command is issued to a binding with DEFBINDNAME. 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 the adding/removing sensors from the weather station.

Throws:
ParseException