de.fhg.igd.semoa.bin
Class Publish

java.lang.Object
  extended byde.fhg.igd.semoa.bin.Publish

public class Publish
extends Object

Instantiates, configures, and publishes an object in the Environment.

This class is used best in conjunction with Shell (as a command line tool in a "shell" that interfaces directly to a JVM). It is started by means of public static void main(String[] argv).

The general format of the options passed to this tool is <general options> [; <class specific options>]. The semicolon signals the beginning of options which are generated dynamically based on the actual class to be configured.

General options

help
Prints a summary of options.
class <class name>
The class that shall be instantiated. If -key is also specified and an object is registered in the global Environment under that key then that object's class is checked against the class with name <class name>.
spawn
Starts the instantiated object in a thread if it is Runnable and its run() method is invoked (see dynamic options).
key <path>
Registers the instantiated object in the Environment with key <path>, or configures the object already registered under that key. If -key is not defined then -class must be defined.
detach
Signals that the instantiated object shall be registered in the global Environment with the DETACH flag set. Ignored if -key is specified and an object is already registered under that key.
proxy <type>
Specifies the proxy type that shall be used when registering the instantiated object. Ignored if -key is specified and an object is already registered under that key.
In addition to general options, a number of dynamically generated options can be specified. These options are derived from the class to be instantiated/configured. For each method with signature public void name() , an option -name is generated. For each method with signature public void setName(type param) , an option -Name <type> is generated. type must be a type understood by ArgsParser (array types are allowed, but no arrays of arrays).

Specifying -name will then invoke method name() , and specifying -Name <args> will invoke method setName(<args>) on the instantiated/registered object.

Version:
"$Id: Publish.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Volker Roth
See Also:
Configure

Field Summary
static String DESCR
          The descriptor of the general options.
 
Constructor Summary
Publish()
           
 
Method Summary
static void main(String[] argv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCR

public static final String DESCR
The descriptor of the general options. Further option descriptors will be created dynamically based on the class that shall be configured.

See Also:
Constant Field Values
Constructor Detail

Publish

public Publish()
Method Detail

main

public static void main(String[] argv)
                 throws Exception
Throws:
Exception


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.