|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.primetime.PrimeTime
The PrimeTime class serves as a starting point for applications constructed with the PrimeTime framework. Virtually no initialization is performed by this class, instead it explores the classpath defined for the VM and locates designated classes referred to collectively as "OpenTools." These classes are responsible for configuring the PrimeTime framework at runtime using a variety of registration methods.
The OpenTools classes are located by reading the manifest file for each entry on the classpath and looking for entries of the following form:
OpenTools-Core: com.borland.primetime.vfs.NewFilesystem com.borland.primetime.vfs.FileFilesystem com.borland.primetime.vfs.ZipFilesystem
Note that "Core" can be replaced by any case-sensitive OpenTools category name, that the class names that follow must be fully-qualified OpenTools classes and that the multi-line format shown below is legal only if each line but the last includes a trailing space.
For convenience during development, each classpath entry may also have an override file associated with it. These have the same format as manifest files and are found by appending ".opentools" to the path entry. For example, PrimeTime would scan "c:\classes.opentools" for the classpath entry "c:\classes" and "c:\classes.zip.opentools" for the entry "c:\classes.zip"
Each OpenTool class must declare an initialization method as follows:
public static void initOpenTool(byte majorVersion, byte minorVersion) { if (majorVersion != 4) return; // Initialize OpenTool here... }
The version numbers passed may be used to assist in deciding which features of the OpenTools API can be safely used:
Field Summary | |
static byte |
CURRENT_MAJOR_VERSION
|
static byte |
CURRENT_MINOR_VERSION
|
Method Summary | |
static void |
findOpenTools()
|
static java.lang.String[] |
getInitializedOpenTools()
Returns the list of OpenTools that have been initialized in this PrimeTime session. |
static void |
initializeOpenTools(java.lang.String category)
Initializes all OpenTools in a specified category. |
static boolean |
isVerbose()
|
static void |
registerCommand(java.lang.String flag,
Command command)
Registers a command handler for a particular command-line flag. |
static void |
start(java.lang.String category,
java.lang.String[] args)
Initializes all OpenTools in the specified category and parses the PrimeTime command-line arguments via invokeCommands . |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final byte CURRENT_MAJOR_VERSION
public static final byte CURRENT_MINOR_VERSION
Method Detail |
public static void start(java.lang.String category, java.lang.String[] args)
invokeCommands
.args
- An array of Strings representing command-line arguments.public static boolean isVerbose()
public static void registerCommand(java.lang.String flag, Command command)
flag
- The case-sensitive flag that invokes the associated command.
This value must not include the leading hyphen. A null value is used to
register the "default" command as described under
invokeCommands
.command
- The com.borland.primetime.Command
to be
associated with the flag. A null value indicates that the associated flag
should be removed from the command registry.public static void initializeOpenTools(java.lang.String category)
category
- The OpenTool category to initialize.public static java.lang.String[] getInitializedOpenTools()
public static void findOpenTools()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |