dev@glassfish.java.net

CLI Framework for JMX

From: Jim Jiang <jim.jiang_at_sun.com>
Date: Sat, 28 Oct 2006 19:47:26 +0800

For admin-cli project, there are 3 packages: framework, commands, cli-api.
In CLI-framework, an xml file was used for defining the commands.
/ <Command name="list-domains"
classname="com.sun.enterprise.cli.commands.ListDomainsCommand"
numberofoperands="0" usage-text="list-domains [--terse=false]
[--echo=false] [--domaindir domain_directory]">
            <ValidOption name="terse"/>
            <ValidOption name="echo"/>
            <ValidOption name="domaindir"/>
        </Command>

/But for JMX command, the command was defined as java method:
for example, com.sun.cli.jmx.cmd.DeleteCmd:
/ getNumRequiredOperands() {
        return( 1 );
    }/
...

Could anyone give any explanation for why no different way used for
the command definition?

Thanks,
Jim