@Override
    public Object doHandleRequest(MBeanServerConnection server, JmxExecRequest request)
            throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException {
        OperationAndParamType types = extractOperationTypes(server,request);
        int nrParams = types.paramClasses.length;
        Object[] params = new Object[nrParams];
        List<Object> args = request.getArguments();
        verifyArguments(request, types, nrParams, args);
        for (int i = 0;i < nrParams; i++) {
        	if (types.paramOpenTypes != null && types.paramOpenTypes[i] != null) {
        		params[i] = converters.getToOpenTypeConverter().convertToObject(types.paramOpenTypes[i], args.get(i));
        	} else { 
        		params[i] = converters.getToObjectConverter().prepareValue(types.paramClasses[i], args.get(i));
        	}
        }

        // TODO: Maybe allow for a path as well which could be applied on the return value ...
        return server.invoke(request.getObjectName(),types.operationName,params,types.paramClasses);
    }
@ Override public Object doHandleRequest ( MBeanServerConnection server , JmxExecRequest request ) throws InstanceNotFoundException , AttributeNotFoundException , ReflectionException , MBeanException , IOException { OperationAndParamType types = extractOperationTypes ( server , request ) ; int nrParams = types . paramClasses . length ; Object [ ] params = new Object [ nrParams ] ; List < Object > args = request . getArguments ( ) ; verifyArguments ( request , types , nrParams , args ) ; for ( int i = 0 ; i < nrParams ; i ++ ) { if ( types . paramOpenTypes != null && types . paramOpenTypes [ i ] != null ) { params [ i ] = converters . getToOpenTypeConverter ( ) . convertToObject ( types . paramOpenTypes [ i ] , args . get ( i ) ) ; } else { params [ i ] = converters . getToObjectConverter ( ) . prepareValue ( types . paramClasses [ i ] , args . get ( i ) ) ; } } return server . invoke ( request . getObjectName ( ) , types . operationName , params , types . paramClasses ) ; }
Execute an JMX operation. The operation name is taken from the request, as well as the
arguments to use. If the operation is given in the format "op(type1,type2,...)"
(e.g "getText(java.lang.String,int)" then the argument types are taken into account
as well. This way, overloaded JMX operation can be used. If an overloaded JMX operation
is called without specifying the argument types, then an exception is raised.


@param server server to try
@param request request to process from where the operation and its arguments are extracted.
@return the return value of the operation call