Examples of CULHandlerInternal


Examples of org.openhab.io.transport.cul.internal.CULHandlerInternal

   */
  public static void close(CULHandler handler) {
    synchronized (openDevices) {

      if (handler instanceof CULHandlerInternal) {
        CULHandlerInternal internalHandler = (CULHandlerInternal) handler;
        if (!internalHandler.hasListeners()) {
          openDevices.remove(handler);
          try {
            handler.send("X00");
          } catch (CULCommunicationException e) {
            logger.warn("Couldn't reset rf mode to X00");
          }
          internalHandler.close();
        } else {
          logger.warn("Can't close device because it still has listeners");
        }
      }
    }
View Full Code Here

Examples of org.openhab.io.transport.cul.internal.CULHandlerInternal

        logger.error("Class " + culHandlerclass.getCanonicalName()
            + " does not implement the internal interface");
        throw new CULDeviceException("This CULHandler class does not implement the internal interface: "
            + culHandlerclass.getCanonicalName());
      }
      CULHandlerInternal internalHandler = (CULHandlerInternal) culHandler;
      internalHandler.open();
      for (String command : initCommands) {
        internalHandler.sendWithoutCheck(command);
      }
      return culHandler;
    } catch (SecurityException e1) {
      throw new CULDeviceException("Not allowed to access the constructor ", e1);
    } catch (NoSuchMethodException e1) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.