/** Receive status information about a previous control action */
  private NullLatherValue cmdControlSendCommandResult(ControlSendCommandResult_args args) {
    controlManager.sendCommandResult(
        args.getId(), args.getResult(), args.getStartTime(), args.getEndTime(), args.getMessage());

    // Get live measurements on the resource
    String name = args.getName();
    if (name != null) {
      log.info("Getting live measurements for " + name);
      AppdefEntityID id = new AppdefEntityID(name);
      try {
        measurementManager.getLiveMeasurementValues(authzSubjectManager.getOverlordPojo(), id);
      } catch (Exception e) {
        log.error("Unable to fetch live measurements: " + e, e);
      }
    } else {
      log.error("No plugin name found, not fetching live measurements");
    }

    return NullLatherValue.INSTANCE;
  }
  /**
   * Send an agent a plugin configuration. This is needed when agents restart, since they do not
   * persist control plugin configuration.
   */
  private ControlGetPluginConfig_result cmdControlGetPluginConfig(ControlGetPluginConfig_args args)
      throws LatherRemoteException {
    ControlGetPluginConfig_result res;

    byte[] cfg;

    try {
      cfg = controlManager.getPluginConfiguration(args.getPluginName(), args.getMerge());
    } catch (PluginException exc) {
      log.warn("Error getting control config for plugin '" + args.getPluginName() + "'", exc);
      throw new LatherRemoteException(
          "Error getting control config "
              + "for plugin '"
              + args.getPluginName()
              + "': "
              + exc.getMessage());
    }

    res = new ControlGetPluginConfig_result();
    res.setConfig(cfg);
    return res;
  }