|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.CommandLineParser
stella.rmi.GenericAccess
public class GenericAccess
A small class allowing command-line controled access to rmi-object
implementing the ListenerControlling interface. In the basic
functionality, only the methods in ListenerControlling are
supported, but subclasses should augment the functionality to acces
a wider variety of methods, like BuildingAccess.
Due to the use of a CommandLineParser the sequence of the arguments
and switches is arbitrary.
CommandLineParser| 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 zero-argument command line switches understood. |
static Map<String,String> |
USE
A human-readable description of the switches. |
static String |
ZEROSWITCHES
The zero-argument command line switches understood. |
| Constructor Summary | |
|---|---|
GenericAccess()
Constructs a new listener shifter. |
|
| Method Summary | |
|---|---|
static void |
main(String[] arg)
Register and/or deregisters a listener from a given caster. |
boolean |
processFor(Class me)
Processes the command line arguments after parsing. |
protected boolean |
processSwitches(Remote listener)
Process the command line switches found. |
protected static Remote |
scanFor(Class instance)
Scans the local registry for bindings of the approriate type. |
| 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 |
|---|
public static final String ZEROSWITCHES
public static final String ONESWITCHES
public static Map<String,String> USE
public static final String FOOT
| Constructor Detail |
|---|
public GenericAccess()
| Method Detail |
|---|
public boolean processFor(Class me)
throws RemoteException,
NotBoundException,
MalformedURLException
RemoteException
NotBoundException
MalformedURLException
protected static Remote scanFor(Class instance)
throws RemoteException,
NotBoundException
RemoteException
NotBoundException
protected boolean processSwitches(Remote listener)
throws RemoteException
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.
RemoteException
public static void main(String[] arg)
throws ParseException,
RemoteException,
NotBoundException,
MalformedURLException
ParseException
RemoteException
NotBoundException
MalformedURLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||