public class GenericAccess extends CommandLineParser
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.CommandLineParserCommandLineParser.Template, CommandLineParser.Test| Modifier and Type | Field and Description |
|---|---|
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.
|
HELPSWITCHES| Constructor and Description |
|---|
GenericAccess()
Constructs a new listener shifter.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] arg)
Register and/or deregisters a listener from a given caster.
|
boolean |
processFor(Class<? extends Remote> me)
Processes the command line arguments after parsing.
|
protected boolean |
processSwitches(Remote listener)
Process the command line switches found.
|
protected static Remote |
scanFor(Class<? extends Remote> instance)
Scans the local registry for bindings of the approriate type.
|
addHelpSwitches, getArguments, getCallerName, getCommandLine, getCommands, getRegisteredSwitches, hasAnySwitch, hasHelpSwitch, hasSwitch, hasSwitch, haveAllSwitches, parse, printCommandLine, printCommandLine, registerLine, registerSwitches, setCommands, staticUsage, usagepublic static final String ZEROSWITCHES
public static final String ONESWITCHES
public static final String FOOT
public GenericAccess()
public boolean processFor(Class<? extends Remote> me) throws RemoteException, NotBoundException, MalformedURLException
RemoteExceptionNotBoundExceptionMalformedURLExceptionprotected static Remote scanFor(Class<? extends Remote> instance) throws RemoteException, NotBoundException
RemoteExceptionNotBoundExceptionprotected 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.RemoteExceptionpublic static void main(String[] arg) throws ParseException, RemoteException, NotBoundException, MalformedURLException