lime.mobileagent.mucode
Class Launcher

java.lang.Object
  extended bylime.util.Launcher
      extended bylime.mobileagent.mucode.Launcher
All Implemented Interfaces:
PropertyKeys

public class Launcher
extends Launcher

The mobileagent.mucode.Launcher starts the run time support necessary for both Lime and muCode from the command line. Much of the utiltiy is identical to the lime.util.Launcher and will not be repeated here.

One difference from the application perspective is the change in the command line options:

Usage: java lime.mobileagent.mucode.Launcher [--mucode [mucode options]] [--lime [lime options]] [--load [class names of agents to be loaded]] [--send [<host:port of target mucode server> <class names of agents to be loaded>]]

For instance:

 java lime.mobileagent.mucode.Launcher --mucode -port
 2000 --lime -port 3000 -debug on --load InteractiveMobileAgent
loads InteractiveMobileAgent in a mucode server that listens on port 2000, connected with a Lime server (whose debug messages are enabled) listening on port 3000.
java lime.mobileagent.mucode.Launcher --send localhost:2000 InteractiveMobileAgent InteractiveMobileAgent
loads (remotely) two additional instances of InteractiveMobileAgent in the mucode server previously created and then quits. After this last command, if the three instances of InteractiveMobileAgent engage their tuple spaces they will all share the same host-level tuple space.

Note: If specified, the --mucode option must mandatorily come before the --lime option, and the --load option must be last.

The --load option causes the mobile agent to be loaded into the muCode server. The lime option -load instead loads the agent directly in the Lime server.

The --send option performs the remote loading and then quits.

See Also:
Launcher

Field Summary
private  boolean isSend
           
private  java.lang.String[] limeArgs
           
private  int limeEnd
           
static java.lang.String LIMEopt
           
private  int limeStart
           
private  java.lang.String[] loadArgs
           
private  int loadEnd
           
static java.lang.String LOADopt
           
private  int loadStart
           
private  java.lang.String[] mucodeArgs
           
private  int mucodeEnd
           
static java.lang.String MUCODEopt
           
private  int mucodeStart
           
private  mucode.MuServer muserver
           
static java.lang.String SENDopt
           
 
Fields inherited from class lime.util.Launcher
 
Fields inherited from interface lime.PropertyKeys
CONNECTkey, DEBUGkey, ENGAGEkey, ENGAGEMENT_MODEkey, ERRORSkey, GM_DETECTORkey, GM_DISSEMINATORkey, GM_MAX_SPEEDkey, GM_MCASTADDRkey, GM_MCASTPORTkey, GM_NETWORK_LATENCYkey, GM_PERIODkey, GM_RANGEkey, GPS_BAUDkey, GPS_PORTkey, LOADkey, MESSAGESkey, PORTkey, QUITkey, TSFACTORYkey
 
Constructor Summary
Launcher()
           
 
Method Summary
 void launch(java.lang.String[] args, int index)
          Launches a LIMEServer or loads one or more agents onto another LIMEServer.
static void main(java.lang.String[] args)
          Bootstraps the Launcher.
 void parseSubArgs(java.lang.String[] args, int index)
          lime args must come after mucode args
private  void printHelp()
           
 void sendAgents(mucode.MuServer s, java.lang.String dest, java.lang.String[] agents)
           
 
Methods inherited from class lime.util.Launcher
parseArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MUCODEopt

public static final java.lang.String MUCODEopt
See Also:
Constant Field Values

LIMEopt

public static final java.lang.String LIMEopt
See Also:
Constant Field Values

LOADopt

public static final java.lang.String LOADopt
See Also:
Constant Field Values

SENDopt

public static final java.lang.String SENDopt
See Also:
Constant Field Values

muserver

private mucode.MuServer muserver

limeStart

private int limeStart

limeEnd

private int limeEnd

mucodeStart

private int mucodeStart

mucodeEnd

private int mucodeEnd

loadStart

private int loadStart

loadEnd

private int loadEnd

isSend

private boolean isSend

limeArgs

private java.lang.String[] limeArgs

mucodeArgs

private java.lang.String[] mucodeArgs

loadArgs

private java.lang.String[] loadArgs
Constructor Detail

Launcher

public Launcher()
Method Detail

main

public static void main(java.lang.String[] args)
Description copied from class: Launcher
Bootstraps the Launcher.


launch

public void launch(java.lang.String[] args,
                   int index)
Description copied from class: Launcher
Launches a LIMEServer or loads one or more agents onto another LIMEServer.

Overrides:
launch in class Launcher

sendAgents

public void sendAgents(mucode.MuServer s,
                       java.lang.String dest,
                       java.lang.String[] agents)

parseSubArgs

public void parseSubArgs(java.lang.String[] args,
                         int index)
lime args must come after mucode args


printHelp

private void printHelp()