code: public Object handleOperation(String operation, Object[] params) throws IOException {
          if (OPERATION_DOWNLOAD.equals(operation)) {
              if (params.length == 2) {
                  downloadFile((String) params[0], (String) params[1]);
              } else {
                  //partial download
                  return downloadFile((String) params[0], (String) params[1], (Long) params[2], (Long) params[3]);
              }
          } else if (OPERATION_UPLOAD.equals(operation)) {
              uploadFile((String) params[0], (String) params[1], (Boolean) params[2]);
          } else if (OPERATION_DELETE.equals(operation)) {
              deleteFile((String) params[0]);
          } else if (OPERATION_DELETE_ALL.equals(operation)) {
              deleteAll((List<String>) params[0]);
          } else {
              throw logUnsupportedOperationError("handleOperation", operation);
          }
  
          //currently all operations are void, so return null.
          return null;
      }
docs: Handle MBean invocation requests