private synchronized void handleConnectionProperty(INDISwitchElementAndValue[] newEvs, Date timestamp) {
    for (int i = 0 ; i < newEvs.length ; i++) {
      INDISwitchElement el = newEvs[i].getElement();
      SwitchStatus s = newEvs[i].getValue();

      if (el == connectedE) {
        if (s == SwitchStatus.ON) {
          if (connectedE.getValue() != SwitchStatus.ON) {
            try {
              ((INDIConnectionHandler)this).driverConnect(timestamp);

              setConnectionProperty(true);
            } catch (INDIException e) {
              setConnectionProperty(false, e.getMessage());
            }
          } else {
            setConnectionProperty(true);
          }
        }
      } else if (el == disconnectedE) {
        if (s == SwitchStatus.ON) {
          if (disconnectedE.getValue() != SwitchStatus.ON) {
            try {
              ((INDIConnectionHandler)this).driverDisconnect(timestamp);

              setConnectionProperty(false);
            } catch (INDIException e) {
              setConnectionProperty(true, e.getMessage());
            }
          } else {
            setConnectionProperty(false);
          }
        }
      }
    }
  }