/** * Refreshes the version. */ public void refreshVersion() { if (onlineStatus == OnlineStatus.ONLINE) { try { version = serverStatusService.getVersion(); } catch (Exception e) { version = VersionService.UNKNOWN_VERSION; } } else { version = VersionService.UNKNOWN_VERSION; } }
/** * Returns if the server is online by checking the {@link IServerStatusService}. * * @return Returns if the server is online by checking the {@link IServerStatusService}. */ private boolean isOnline() { try { ServerStatus status = serverStatusService.getServerStatus(); if (ServerStatus.SERVER_ONLINE == status) { checkKey(status.getRegistrationIdsValidationKey()); return true; } return false; } catch (Exception e) { return false; } }