|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lime.util.Launcher
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 |
-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. |
-quit |
Quits the LimeServer immediately upon loading an agent onto another
LIMEServer. It is 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. |
-connect {on|off} (default: off ) |
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. |
-engage {on|off} (default: off ) |
When on, the Launcher will immediately engage the LIMEServer upon creation. |
-engagementMode {explicit|realGPS|fakeGPS}
(default: explicit ) |
Specifies the type of engagement mode to use. |
-tsfactory {builtin|tspaces|tspaces201}
(default: builtin ) |
Sets the tuplespace factory to be used, by default this is lights.adapters.builtin.TupleSpaceFactory. |
-port {port} (default: 1973 ) |
Sets the unicast port through which messages are sent and received. |
-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. |
-gpsPort {port} (default: COM1 ) |
The name of the port that the GPS unit is connected to. |
-gpsBaud {baud} (default: 4800 ) |
The baud rate of the communications port used by the GPS unit. |
-mcastaddr {addr} (default: 230.0.0.1 ) |
Sets the multicast address used by GroupMember. |
-mcastport {port} (default: 6000 ) |
Sets the multicast port used by GroupMember. |
-gmDetector {Beaconing|SafeDistance} (default: SafeDistance ) |
The Detector for the GroupManager to use. |
-gmDisseminator {SinglePhase} (default: SinglePhase ) |
The Disseminator for the GroupManager to use. |
-gmPeriod {period} (default: 1000 ) |
The period in milliseconds at which beacons are broadcasted. |
-gmRange {range} (default: 20 ) |
The wireless broadcast range in meters. |
-gmMaxSpeed {speed} (default: 1 ) |
The maximum speed in meters per second that hosts can move. |
-gmNetworkLatency {time} (default: 0 ) |
The latency of the network in milliseconds. |
PropertyKeys
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 |
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 |
public Launcher()
Method Detail |
public static void main(java.lang.String[] args)
public void launch(java.lang.String[] args, int index)
public void parseArgs(java.lang.String[] args, int index)
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 onif 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);
args
- the command line arguments.index
- the index of the first argument for the
LimeServer
in the argument array.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |