An abstract method that Executes the command
if (!validateOptions())
throw new CommandValidationException("Validation is false");
//use http connector
MBeanServerConnection mbsc = getMBeanServerConnection(getHost(), getPort(),
getUser(), getPassword());
final String objectName = getObjectName();
final Object[] params = getParamsInfo();
final String operationName = getOperationName();
final String[] types = getTypesInfo();
try
{
//if (System.getProperty("Debug") != null) printDebug(mbsc, objectName);
Object returnValue = mbsc.invoke(new ObjectName(objectName),
operationName, params, types);
handleReturnValue(returnValue);
CLILogger.getInstance().printDetailMessage(getLocalizedString(
"CommandSuccessful",
new Object[] {name}));
}
catch(Exception e)
{
displayExceptionMessage(e);
}