Exemplo n.º 1
0
  private void initEffect() {
    State state = State.UNKNOWN;

    try {
      state = appRemote.getData().getActivationState().getValue();
    } catch (CouldNotPerformException e) {
      ExceptionPrinter.printHistory(e, LOGGER, LogLevel.ERROR);
    }
    setAppIconAndText(state);
  }
Exemplo n.º 2
0
 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);
   }
 }