private String status(final ObjectName namePattern, final String pidAttribute,
      final String statusMethod, final String[] attributes, final Object[] values)
      throws ConnectionFailedException, IOException, MBeanInvocationFailedException {
    return invokeOperationOnTargetMBean(namePattern, pidAttribute, statusMethod, attributes, values)
        .toString();
  }
Connects to the process and acquires its status.

@param namePattern the name pattern of the MBean to use for stopping
@param pidAttribute the name of the MBean attribute with the process id to compare against
@param statusMethod the name of the MBean operation to invoke
@param attributes the names of the MBean attributes to compare with expected values
@param values the expected values of the specified MBean attributes

@return string describing the status of the process

@throws ConnectionFailedException if there was a failure to connect to the local JMX connector
        in the process
@throws IOException if a communication problem occurred when talking to the MBean server
@throws MBeanInvocationFailedException if failed to invoke stop on the MBean for any reason
geode-core/src/main/java/org/apache/geode/internal/process/MBeanProcessController.java