/** * @param runnable * @throws IOException * @throws CommandExecuteException * @throws CantUpdateApplicationException */ void update() throws CantUpdateApplicationException { final InstallationDescription localInstallationDescription = getLocalInstallationDescription(); final UpdateResponse serverResponse = getServerResponse(localInstallationDescription.getApplicationVersionObj()); this.actualClientCanWorkWithServer = serverResponse.isActualClientCanWorkWithServer(); if (serverResponse.getInstallationStatus() == InstallationStatus.UP_TO_DATE) { continueApplictionIsUpToDate(); } else if (serverResponse.getInstallationStatus() == InstallationStatus.OUT_OF_DATE) { runUpdate(localInstallationDescription, serverResponse.getInstallationDescription()); } else if (serverResponse.getInstallationStatus() == InstallationStatus.UNKNOWN) { logger.warn( "Cant update application server response is unknown. Cause: " + serverResponse.getMessage()); if (serverResponse.isActualClientCanWorkWithServer()) { continueApplictionIsUpToDate(); } else { cantUpdate(serverResponse.getMessage()); } } else { cantUpdate(serverResponse.getMessage()); } }