public Object invokeOperation ( Map < String , String [ ] > parameterMap ) throws JMException { MBeanParameterInfo [ ] parameterInfoArray = operationInfo . getSignature ( ) ; Object [ ] values = new Object [ parameterInfoArray . length ] ; String [ ] types = new String [ parameterInfoArray . length ] ; MBeanValueConverter valueConverter = createMBeanValueConverter ( parameterMap ) ; for ( int parameterNum = 0 ; parameterNum < parameterInfoArray . length ; parameterNum ++ ) { MBeanParameterInfo parameterInfo = parameterInfoArray [ parameterNum ] ; String type = parameterInfo . getType ( ) ; types [ parameterNum ] = type ; values [ parameterNum ] = valueConverter . convertParameterValue ( parameterInfo . getName ( ) , type ) ; } return mBeanServer . invoke ( objectName , operationInfo . getName ( ) , values , types ) ; }
Invoke the operation .