Package org.openhab.binding.opensprinkler

Examples of org.openhab.binding.opensprinkler.OpenSprinklerBindingProvider


    // event bus goes here. This method is only called if one of the
    // BindingProviders provide a binding for the given 'itemName'.
   
    if (command instanceof OnOffType) { 
      final OnOffType switchCommand = (OnOffType) command;
      final OpenSprinklerBindingProvider bindingProvider = findFirstMatchingBindingProvider(itemName, command);
      final int station = bindingProvider.getStationNumber(itemName);
     
      if (station < 0 || station >= numberOfStations) {
        logger.warn("Station " + station + " is not in the valid [" + 0 + ".." + numberOfStations + "] range");
        return;
      }
View Full Code Here


   *
   * @return the matching binding provider or <code>null</code> if no binding
   * provider could be found
   */
  private OpenSprinklerBindingProvider findFirstMatchingBindingProvider(String itemName, Command command) {
    OpenSprinklerBindingProvider firstMatchingProvider = null;
   
    for (OpenSprinklerBindingProvider provider : this.providers) {
      boolean match = provider.providesBindingFor(itemName);
      if (match) {
        firstMatchingProvider = provider;
View Full Code Here

TOP

Related Classes of org.openhab.binding.opensprinkler.OpenSprinklerBindingProvider

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.