-
Notifications
You must be signed in to change notification settings - Fork 12
L2pNodeLauncher Commands
This is a list containing the most used commands in the L2pNodeLauncher class.
These arguments are all optional (except --port
or -p
) but have to be the first after the call of the class name:
java -cp "lib/*" i5.las2peer.tools.L2pNodeLauncher [--help] [--colored-shell] --port 9010 [--bootstrap vermeer.informatik.rwth-aachen.de:9085,steen.informatik.rwth-aachen.de:9085] [optional arguments] [interactive commands] [interactive]
--help|-h
Prints a help message of the L2pNodeLauncher.
--version|-v
Prints the las2peer version.
--colored-shell|-c
Enables coloured output, since this feature only works on Unix-like terminals and leads to cryptic output in Windows command shells, it's disabled by default.
--port|-p [port]
Sets the port the LAS2peer node should listen to. Example: --port 9010
--bootstrap|-b [host-list]
requires a comma seperated list of [address:ip] pairs of bootstrap nodes used connect multiple nodes to a network. If no bootstrap argument is provided, a new las2peer network is started. This argument can occur multiple times. Example: --bootstrap las2peer.dbis.rwth-aachen.de:9080,vermeer.informatik.rwth-aachen.de:9085
. Attention: 127.0.0.1
or localhost
does not work here! You need to use your actual IP.
--log-directory|-l [directory]
lets you choose the directory for log files (default: log/
)
--service-directory|-s [directory]
adds the directory you added your services to (default: ./service/
) to the class loader. This argument can occur multiple times.
--observer|-o
starts a monitoring observer at this node
--node-id-seed|-n [long]
generates the node id by using this seed to provide persistence. Set this parameter to keep stored across node restarts. Example: --node-id-seed 123456789
--storage-mode|-m filesystem|memory
set Pastry's storage mode. If no storage mode is specified, filesystem
will be used.
--sandbox|-sb
enables the las2peer sandbox
--debug|-debug
starts the node in debugging mode
interactive commands
Accepts a list of space separated commands executed automatically after startup in the interactive shell (see below) of the L2pNodeLauncher.
interactive
Leaves the L2pNodeLauncher in the interactive shell state after executing all given interactive commands.
These commands can be either executed when starting the node (in the start script) or after the node has been started by hand:
uploadStartupDirectory(['path/to/startup/directory'])
uploads the contents of the startup directory (default: 'etc/startup') to the network storage of a LAS2peer network (note, that for agents you have to provide the passphrases in the file 'passphrases.txt' stored in the same directory)
registerUserAgent('anonymous','anonymous')
registers a user at this node (for details on how to generate additional user agents, consult the Agents-Users page in this wiki)
startWebConnector / startHttpConnector
starts one of the two predefined connectors
startConnector('connector.package.class')
starts an arbitrary connector given by its class name
startService('i5.las2peer.services.servicePackage.ServiceClass@1.0','SampleServicePass')
starts a service by name and exact version with a known agent
startService('i5.las2peer.services.servicePackage.ServiceClass@1.0')
starts a service and generates a new service agent for this service (version must match exactly)
invoke('i5.las2peer.services.servicePackage.ServiceClass@1.0','aMethod','parameter1-parameter2')
first argument is the service class and version (no exact match needed, for specifying versions see Remote-Method-Invocation), second the service method and third are parameters (use '-' as separator to pass multiple parameters in the last argument of this call)
unregisterCurrentAgent
unregisters the currently active agent (registered by the registerUserAgent method) to register another one to be used with this launcher
findService('i5.las2peer.services.servicePackage.ServiceClass@1.0')
looks for the service 'i5.las2peer.services.servicePackage.ServiceClass' in the LAS2peer network and determines whether it exists (version must match exactly)
findAgent('agent ID')
looks for the given agent with the given agent id in the LAS2peer network
v / version
prints the las2peer version
exit / shutdown
closes the current node
getServiceMethods('i5.las2peer.services.servicePackage.ServiceClass@1.0')
returns all services methods' signatures of the specified service (version must match exactly)
interactive
should be executed as a login argument when starting the L2PNodeLauncher and enables the interactive console
(see additional tutorial L2pNodeLauncher - Interactive Command Line)
getLocalNodeInfo
returns some node information specified in the 'nodeInfo.xml' (located in the 'etc' folder)
getInfoOfKnownNodes
returns the node information about all known nodes