lime.util
Class Launcher

java.lang.Object
  |
  +--lime.util.Launcher
All Implemented Interfaces:
PropertyKeys
Direct Known Subclasses:
Launcher

public class Launcher
extends java.lang.Object
implements PropertyKeys

The Launcher starts the run time support necessary for Lime from the command line, and serves as the mechanism for passing parameters to the LimeServer when starting the runtime support from within an application (see examples/SimpleLime.java for an example of how to do this). The following options are recognized:
Option Description
-tsfactory {builtin|tspaces|tspaces201} (default: builtin) Sets the tuplespace factory to be used. Currently only builtin is supported.
-connect {on|off} (default: on) If on, connections are maintained until a disengagement takes place. Otherwise, a new connection is setup and torn down each time a message needs to be exchanged with another host.
-mcast {on|off} (default: on) If off, the multicast receiver is not set up and should only be used when only logical mobility is being used. Otherwise, the multicast receiver is enabled and hosts will be able to engage.
-mcastaddr {addr} (default: 230.0.0.1) Reset the default multicast address to both send and receive. Caution: when resetting this parameter, all Lime hosts which are intended to be part of the same Lime community must also be reset
-mcastport {port} (default: 6000) Reset the port on which the multicast messages are sent and received.
-port {port} (default: 1973) Reset the port on which unicast messages are sent and received
-quit Quits the LimeServer. Useful only in conjunction with -load. This assumes that there is another local LimeServer which the agents are being loaded into. After loading the agents into another local LimeServer, the LimeServer that was created with this command is terminated.
-messages {on|off} (default: on) Activates or deactivates information messages.
-errors {on|off} (default: on) Activates or deactivates error messages.
-debug {on|off} (default: off) Activates or deactivates debug messages.
-load agentClassName1, agentClassName2, ... Loads in a server on this host an agent for each of the specified classnames. This option must be the last argument.

Version:
1.0 alpha
Author:
Amy L. Murphy, Gian Pietro Picco

Fields inherited from interface lime.PropertyKeys
CONNECTkey, DEBUGkey, ERRORSkey, LOADkey, MAFACTORYkey, MCASTADDRkey, MCASTkey, MCASTPORTkey, MESSAGESkey, PORTkey, QUITkey, TSFACTORYkey
 
Constructor Summary
Launcher()
           
 
Method Summary
 void launch(java.lang.String[] args, int index)
           
static void main(java.lang.String[] args)
           
 void parseArgs(java.lang.String[] args, int index)
          Parse an array of String arguments, that usually comes directly from the command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Launcher

public Launcher()
Method Detail

main

public static void main(java.lang.String[] args)

launch

public void launch(java.lang.String[] args,
                   int index)

parseArgs

public void parseArgs(java.lang.String[] args,
                      int index)
Parse an array of String arguments, that usually comes directly from the command line. Useful when the Lime server is embedded in an application that needs to specify its own arguments and still needs to provide access to the server's options through the command line. The arguments for the Lime server must always be the last ones in the argument array. Thus, for instance, in
java MyApplication myArg1 myArg2 -debug on 
if a variable String[] args contains the arguments passed to MyApplication on the command line, the LimeServer object can be easily instantiated by invoking
new lime.util.Launcher().parseArgs(args,2);
Parameters:
args - the command line arguments.
index - the index of the first argument for the LimeServer in the argument array.