Beispiel #1
0
  public boolean getCapUpdateStatistics() throws JposException {
    // Make sure control is opened
    if (!bOpen) {
      throw new JposException(JPOS_E_CLOSED, "Control not opened");
    }

    // Make sure service supports at least version 1.8.0
    if (serviceVersion < deviceVersion18) {
      throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.8.0 compliant.");
    }

    // Perform the operation
    try {
      return service18.getCapUpdateStatistics();
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }
Beispiel #2
0
  public void retrieveStatistics(String[] statisticsBuffer) throws JposException {
    // Make sure control is opened
    if (!bOpen) {
      throw new JposException(JPOS_E_CLOSED, "Control not opened");
    }

    // Make sure service supports at least version 1.8.0
    if (serviceVersion < deviceVersion18) {
      throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.8.0 compliant.");
    }

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