FileDocCategorySizeDatePackage
GenerateJVMReportCommand.javaAPI DocGlassfish v2 API4247Fri May 04 22:25:10 BST 2007com.sun.enterprise.cli.commands

GenerateJVMReportCommand

public class GenerateJVMReportCommand extends GenericCommand
This command will get the version of the application server
version
$Revision: 1.5 $

Fields Summary
private static final String
SUMMARY_OPERATION
private static final String
CLASS_OPERATION
private static final String
MEMORY_OPERATION
private static final String
THREADDUMP_OPERATION
private static final String
TYPE_OPTION
private String
typeOption
Constructors Summary
Methods Summary
protected java.lang.StringgetOperationName()

        String operationName = SUMMARY_OPERATION;
        if (typeOption.equals("memory")) 
            operationName = MEMORY_OPERATION;
        else if (typeOption.equals("class"))
            operationName = CLASS_OPERATION;
        else if (typeOption.equals("thread"))
            operationName = THREADDUMP_OPERATION;
        return operationName;
    
protected voidhandleReturnValue(java.lang.Object returnval)

        final Class cl = returnval.getClass();
        if (cl.getName().equals(String.class.getName()))
        {
            final String returnString = (String)returnval;
	        CLILogger.getInstance().printMessage(returnString);
	    }
    
public booleanvalidateOptions()
An abstract method that validates the options on the specification in the xml properties file This method verifies for the correctness of number of operands and if all the required options are supplied by the client.

return
boolean returns true if success else returns false


                                                           
        
    
        if (!super.validateOptions()) 
            return false;

        typeOption = getOption(TYPE_OPTION);
        if (typeOption.matches("summary|memory|class|thread"))
        {
            return true;
        }
        else
        {
              throw new CommandValidationException(getLocalizedString(
                                                     "InvalidTypeOption"));
        }