Example #1
0
 @Override
 protected void initUnitLabel() {
   String unitLabel = Constants.UNKNOWN_ID;
   try {
     unitLabel = this.appRemote.getData().getLabel();
   } catch (CouldNotPerformException e) {
     ExceptionPrinter.printHistory(e, LOGGER, LogLevel.ERROR);
   }
   setUnitLabelString(unitLabel);
 }
Example #2
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);
  }
Example #3
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);
   }
 }