|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
org.apache.commons.collections.ExtendedProperties
autohit.server.command.CommandRegistry
Command registry implementation. This is immutable. Once created it is set. If you need to catch changes in the registry, you need to create a new instance. Using the default constructor will cause an exception!
This version of the registry will implement it as a ExtendedProperties set.
The registry has two sections. The first section associates the commands with numerics. There may ne NO duplicate numerics. (If there are, the system state is undefined.) This section is constructed as follows:
command.1=compile
command.2=dump
("command.")(numeric)("=")(string name)
The second section contains entries for the commands defined in section one. This section is as follows:
compile.class=autohit.server.command.CommandCompile
compile.help=This will compile a script found at the target.
(string name)(".class=")(class name for implementation)
(string name)(".help=")(string giving a hint about the command)
EPG - Initial - 25Jul03
Field Summary | |
static java.lang.String |
FL_CLASS
|
static java.lang.String |
FL_COMMAND
field literals |
static java.lang.String |
FL_HELP
|
Fields inherited from class org.apache.commons.collections.ExtendedProperties |
basePath, END_TOKEN, file, fileSeparator, include, isInitialized, keysAsListed, START_TOKEN |
Constructor Summary | |
CommandRegistry()
Default Constructor. |
|
CommandRegistry(java.io.InputStream is)
Constructor to create and load from an input stream. |
Method Summary | |
java.lang.Object |
instance(int numeric)
Get an instance of the command specified by the numeric |
Methods inherited from class org.apache.commons.collections.ExtendedProperties |
addProperty, clearProperty, combine, convertProperties, display, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInclude, getInt, getInt, getInteger, getInteger, getInteger, getKeys, getKeys, getLong, getLong, getLong, getProperties, getProperties, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, getVector, getVector, interpolate, isInitialized, load, load, save, setInclude, setProperty, subset, testBoolean |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String FL_COMMAND
public static final java.lang.String FL_CLASS
public static final java.lang.String FL_HELP
Constructor Detail |
public CommandRegistry() throws ServerException
ServerException
public CommandRegistry(java.io.InputStream is) throws ServerException
is
- input stream from where to read the registry
ServerException
Method Detail |
public java.lang.Object instance(int numeric) throws ServerException
numeric
- numeric for the command
ServerException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |