示例#1
0
  public void addItem(MonitorItem item) {
    _monitorMap.put(item.getID(), item);
    syncWithCache(null);
    SearchServicesAsync dserv = SearchServices.App.getInstance();
    dserv.addIDToPushCriteria(
        item.getID(),
        new AsyncCallback<Boolean>() {
          public void onFailure(Throwable caught) {}

          public void onSuccess(Boolean success) {}
        });
  }
示例#2
0
  private void checkStatus(final MonitorItem monItem, final BackgroundStatus bgStatus) {

    SearchServicesAsync dserv = SearchServices.App.getInstance();
    dserv.getStatus(
        bgStatus.getID(),
        false,
        new AsyncCallback<BackgroundStatus>() {
          public void onFailure(Throwable caught) {
            // if we failed, just assumed we are offline, don't fail the report
          }

          public void onSuccess(BackgroundStatus bgStatus) {
            updateReport(monItem, bgStatus);
          }
        });
  }