示例#1
0
  public void waitForKeylockChange(int keyPosition, int timeout) throws JposException {
    // Make sure control is opened
    if (!bOpen) {
      throw new JposException(JPOS_E_CLOSED, "Control not opened");
    }

    // Perform the operation
    try {
      service12.waitForKeylockChange(keyPosition, timeout);
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }
示例#2
0
  public int getPositionCount() throws JposException {
    // Make sure control is opened
    if (!bOpen) {
      throw new JposException(JPOS_E_CLOSED, "Control not opened");
    }

    // Perform the operation
    try {
      return service12.getPositionCount();
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }