|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectledge.container.Main
public class Main
Allows running Ledge applications from the command line.
After the container is started and components are composed and configured,
a designated component is looked up and method
void main(String[]) is invoked on it.
Note that it this mehtod should be non-static so it may take advantage of the actual
component instance composed by the container.
| syntax | required | default | description |
|---|---|---|---|
| -h | no | n/a | Display usage information and exit |
| -v | no | n/a | Display version information on startup |
| -r <root> | no | current working directory | Root directory of Ledge FileSystem |
| -c <config> | no | /config | Base directory of the system's configuration |
| <class-name> | yes | none | Class name of the component to be invoked |
Any command line arguments following the componen class name will be passed verbatim to the component's main method.
Created on Dec 22, 2003
| Field Summary | |
|---|---|
private static org.apache.commons.cli.Options |
options
|
protected static String |
VERSION
version string. |
| Constructor Summary | |
|---|---|
private |
Main()
A private constructor - this class should be used statically only. |
| Method Summary | |
|---|---|
private static void |
addShutdownHook(LedgeContainer ledgeContainer)
|
static void |
main(String[] args)
Command line entry point. |
protected static void |
printUsage()
Prints usage infomration and exits. |
protected static void |
printVersion()
Prints version information. |
static void |
run(String root,
String config,
String componentClassName,
String[] componentArgs)
Runns LedgeContainer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String VERSION
private static org.apache.commons.cli.Options options
| Constructor Detail |
|---|
private Main()
| Method Detail |
|---|
public static void main(String[] args)
args - command line arguments.protected static void printVersion()
protected static void printUsage()
public static void run(String root,
String config,
String componentClassName,
String[] componentArgs)
root - the file system root.config - the configuration base directory.componentClassName - the component to invoke.componentArgs - the component arguments.private static void addShutdownHook(LedgeContainer ledgeContainer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||