예제 #1
0
  public boolean getCapStatisticsReporting() 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.getCapStatisticsReporting();
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }
예제 #2
0
  public void updateStatistics(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.updateStatistics(statisticsBuffer);
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }