Rio Project 4.2 API Documentation



Package org.rioproject.tools.cli

Provides a command line interface for interfacing with Rio.

See:
          Description

Interface Summary
OptionHandler Define plugin interface for CLI option handlers.
 

Class Summary
CLI The CLI class is a utility that provides a Command Line Interface (CLI) for interfacing with the Rio components
CLI.EasterEggHandler Handle easter eggs command
CLI.EmptyHandler Empty impl
CLI.HelpHandler Handle the help command
CLI.HttpHandler Handle http command
CLI.JConsoleHandler Handle jconsole command
CLI.LoginCallbackHandler  
CLI.OptionHandlerDesc Command line option handler descriptor
CLI.SettingsHandler Handle the Set command
CLI.StatsHandler Handle stats command
CLI.StopHandler Handle the destroy command
DirHandler Handles directory commands
EnlistmentHandler Handles enlistment and release of Cybernodes
EnlistmentHandler.EnlistHandler  
EnlistmentHandler.ReleaseHandler  
Formatter Utility class for formatting results
ListHandler Handle the list command
MonitorControl Utility for dealing with Monitor deploy, undeploy and redeploys
MonitorControl.DeployHandler Manages deployments
MonitorControl.RedeployHandler Manages redeployments
MonitorControl.UndeployHandler Manages undeployments
ServiceFinder Find a service
ServiceFinder.InfoFetchStat Simple data structure holding the service name, the time the fetch request began, and the time it ended
ServiceFinder.ServiceInfo Class to hold a ServiceItem and the groups the service is a member of.
ServiceProvisionNotification Class to handle ServiceProvisionEvent notifications
 

Package org.rioproject.tools.cli Description

Provides a command line interface for interfacing with Rio. The command line interface (CLI) for Rio is described in he following sections:

Synopsis
The Rio CLI provides the following default commands

org.rioproject.tools.cli.CLI [commands] [options]

commands

        list [type] [options]
                List discovered services
                    type
                        monitor|cybernode       Lists details for either service
                    options
                        cpu|codeserver  Only one allowed, default is to list "all"

        destroy [all]
                Destroy a specific service (prompted), or all services

        deploy opstring [-t=deploy-timeout] [-icuv]
                Deploy an application
                        -i      Turns off interactive prompting
                        -c      Verifies codebase
                        -u      Automatically update deployments
                        -v      Verbose mode
                        -t      Time in milliseconds to wait for deployment status

        undeploy opstring
                Undeploy an application

        redeploy opstring [clean] [delay=millis-to-delay]
                Redeploy an application

options
        groups=group1,group2            Comma separated names of multicast groups to
                                        discover.
If "all" is provided, this will be
                                        translated to
DiscoveryGroupManagment.ALL_GROUPS
        locators=jini://host[:port]     Comma separated names of lookup locators to
                                        discover

        discoveryTimeout=millis         Discovery timeout (in milliseconds)
        httpPort=port                   Port to use when starting Webster
        -noHttp                         Do not start Webster, mutually exclusive
                                        with the httpPort option

Usage
The CLI can be run in either an interactive (shell) mode, or directly from the command line. If the CLI is invoked without any command options (list, destroy, deploy, redeploy, undeploy), the user is presented with the following shell:

Welcome to the Rio Interactive Shell Program. You can interact
with the Rio using the following commands :

list     http     deploy   destroy  dir    
help     pwd      jconsole redeploy set    
undeploy cd       ls       stats  

For help on any of these commands type help [command].
To leave this program type quit

rio>

Shell specific commands

Directory based commands
pwd
Path of working directory
cd
Change directory. the "~" character can be used, this will change back to the CLI's home directory
ls
Directory listing of the current working directory
dir
Synonomous with the ls command

Environment
set
Property settings, view and/or modify properties the CLI uses
stats
System statistics. Details are shown for the current user, time logged in, whether a Webster instance has been started, and if so details on the Webster instance (port, roots, address bound to), discovered and discarded lookup services, and any pending service information retrieval requests

Utility
jconsole
For all services which have both net.jini.lookup.entry.jmx.JMXProtocolType and net.jini.lookup.entry.jmx.JMXProperty as attributes a list will be created
http
Start and stop Webster instances.
!!
Run the previous command again

By default, the CLI starts a Webster instance, which is used to temporarily serve jars needed by the deployment. This is required if the deployment document declares a codebase with the following:

<Codebase>$[org.rioproject.codeserver]</Codebase>

The Webster instance created by this utility will be terminated upon task completion, care must be taken to ensure the adaptive codebase option is being employed. If a Webster instance is not desired, use the -noHttp option

Tip
If you are running the CLI on OSX (or other unixes) and ant to use your up & down arrows for command line retrieval, use rlwrap. Instead of running “rio”, run instead “rlwrap rio”. Or create an alias in your .bash_profile (or appropriate login shell settings file)

alias rio='rlwrap $RIO_HOME/bin/rio'


Configuring the CLI
The CLI supports the following configuration entries, with component org.rioproject.tools.cli


Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.