stella.telescope
Class TelescopeAccess

java.lang.Object
  extended by util.CommandLineParser
      extended by stella.rmi.GenericAccess
          extended by stella.telescope.TelescopeAccess

public class TelescopeAccess
extends GenericAccess

A small program allowing access to TelescopeControlling enhanced objects. The command line arguments are scanned for recognized switches and processed accordingly. Additionally to the functionality of the parent class ShiftListener, this class supports the following switches:


Nested Class Summary
 
Nested classes/interfaces inherited from class util.CommandLineParser
CommandLineParser.Test
 
Field Summary
static String FOURSWITCHES
          The command line switches understood by this access class, two arg.
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 String ZEROSWITCHES
          The command line switches understood by this class with no arg.
 
Fields inherited from class stella.rmi.GenericAccess
FOOT, USE
 
Constructor Summary
TelescopeAccess()
          Constructs a new camera access instance.
 
Method Summary
static void main(String[] arg)
          Access to a camera-control object.
protected  boolean processSwitches(Remote listener)
          Process the command line switches found.
 
Methods inherited from class stella.rmi.GenericAccess
processFor, scanFor
 
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

FOURSWITCHES

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

See Also:
Constant Field Values
Constructor Detail

TelescopeAccess

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

Method Detail

processSwitches

protected boolean processSwitches(Remote listener)
                           throws RemoteException
Process the command line switches found. If the remote reference handed over is a SesControlling and one of the switches defined in ZEROSWITCHES, ONESWITCHES, TWOSWITCHES,#THREESWITCHES, or #SIXSWITCHES 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: Prior to the new command line switches, the one provided by the parent class are processed.

Overrides:
processSwitches in class GenericAccess
Returns:
True on success.
Throws:
RemoteException

main

public static void main(String[] arg)
                 throws ParseException,
                        RemoteException,
                        NotBoundException,
                        MalformedURLException
Access to a camera-control object. Command line switches may be grouped arbitrarily.

Throws:
ParseException
RemoteException
NotBoundException
MalformedURLException