public JsonValue undeploy(String routeId) throws RouterHandlerException {
  write.lock();
  try {
    JsonValue routeConfig=unload(routeId);
    directoryMonitor.delete(routeId);
    logger.info("Undeployed the route with id '{}'",routeId);
    return routeConfig;
  }
  finally {
    write.unlock();
  }
}

public JsonValue undeploy ( String routeId ) throws RouterHandlerException { write . lock ( ) ; try { JsonValue routeConfig = unload ( routeId ) ; directoryMonitor . delete ( routeId ) ; logger . info ( "Undeployed the route with id '{}'" , routeId ) ; return routeConfig ; } finally { write . unlock ( ) ; } }
undeploy a route , meaning that it unloads it but also deletes the associated file .
