Package org.openhab.binding.homematic.internal.communicator.ProviderItemIterator

Examples of org.openhab.binding.homematic.internal.communicator.ProviderItemIterator.ProviderItemIteratorCallback


    event.setHmValueItem(context.getStateHolder().getState(event.getBindingConfig()));
    if (event.getHmValueItem() != null) {
      event.getHmValueItem().setValue(event.getNewValue());

      new ProviderItemIterator().iterate(event.getBindingConfig(), new ProviderItemIteratorCallback() {

        @Override
        public void next(HomematicBindingConfig providerBindingConfig, Item item, Converter<?> converter) {
          State state = converter.convertFromBinding(event.getHmValueItem());
          context.getEventPublisher().postUpdate(item.getName(), state);
View Full Code Here


  /**
   * Publishes the event to all items bound to the same Homematic item.
   */
  private void publishToAllBindings(final Event event) {
    new ProviderItemIterator().iterate(event.getBindingConfig(), new ProviderItemIteratorCallback() {

      @Override
      public void next(HomematicBindingConfig providerBindingConfig, Item item, Converter<?> converter) {
        if (!item.getName().equals(event.getItem().getName())) {
          if (event.isCommand()) {
View Full Code Here

    Iterator<Map.Entry<HomematicBindingConfig, Long>> iterator = itemsToDisable.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry<HomematicBindingConfig, Long> entry = iterator.next();
      long diff = System.currentTimeMillis() - entry.getValue();
      if (diff > MIN_AGE) {
        new ProviderItemIterator().iterate(entry.getKey(), new ProviderItemIteratorCallback() {

          @Override
          public void next(HomematicBindingConfig providerBindingConfig, Item item, Converter<?> converter) {
            HmValueItem hmValueItem = context.getStateHolder().getState(providerBindingConfig);
            if (providerBindingConfig instanceof ProgramConfig
View Full Code Here

  /**
   * Iterate through all items and publishes the state.
   */
  protected void publish(final HomematicBindingConfig bindingConfig, final HmValueItem hmValueItem) {
    new ProviderItemIterator().iterate(bindingConfig, new ProviderItemIteratorCallback() {

      @Override
      public void next(HomematicBindingConfig providerBindingConfig, Item item, Converter<?> converter) {
        State state = converter.convertFromBinding(hmValueItem);
        context.getEventPublisher().postUpdate(item.getName(), state);
View Full Code Here

TOP

Related Classes of org.openhab.binding.homematic.internal.communicator.ProviderItemIterator.ProviderItemIteratorCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.