private void initEffect() { State state = State.UNKNOWN; try { state = appRemote.getData().getActivationState().getValue(); } catch (CouldNotPerformException e) { ExceptionPrinter.printHistory(e, LOGGER, LogLevel.ERROR); } setAppIconAndText(state); }
private void sendStateToRemote(final State state) { try { appRemote .setActivationState(ActivationState.newBuilder().setValue(state).build()) .get(Constants.OPERATION_SERVICE_MILLI_TIMEOUT, TimeUnit.MILLISECONDS); } catch (InterruptedException | ExecutionException | TimeoutException | CouldNotPerformException ex) { ExceptionPrinter.printHistory(ex, LOGGER, LogLevel.ERROR); setWidgetPaneDisable(true); } }