Class MultimodeCommand

  • All Implemented Interfaces:
    org.glassfish.hk2.api.PostConstruct

    @Service(name="multimode")
    @PerLookup
    public class MultimodeCommand
    extends CLICommand
    A scaled-down implementation of multi-mode command.
    Author:
    केदार(km@dev.java.net), Bill Shannon
    • Constructor Detail

      • MultimodeCommand

        public MultimodeCommand()
    • Method Detail

      • validate

        protected void validate()
                         throws org.glassfish.api.admin.CommandException,
                                org.glassfish.api.admin.CommandValidationException
        The validate method validates that the type and quantity of parameters and operands matches the requirements for this command. The validate method supplies missing options from the environment.
        Overrides:
        validate in class CLICommand
        Throws:
        org.glassfish.api.admin.CommandException - if execution of the command fails
        org.glassfish.api.admin.CommandValidationException - if there's something wrong with the options or arguments
      • usageOptions

        protected Collection<org.glassfish.api.admin.CommandModel.ParamModel> usageOptions()
        In the usage message modify the --printprompt option to have a default based on the --interactive option.
        Overrides:
        usageOptions in class CLICommand
      • executeCommand

        protected int executeCommand()
                              throws org.glassfish.api.admin.CommandException,
                                     org.glassfish.api.admin.CommandValidationException
        Description copied from class: CLICommand
        Execute the command using the options in options and the operands in operands.
        Specified by:
        executeCommand in class CLICommand
        Returns:
        the exit code
        Throws:
        org.glassfish.api.admin.CommandException - if execution of the command fails
        org.glassfish.api.admin.CommandValidationException - if there's something wrong with the options or arguments