Exemple #1
0
 private void cancelPendingSummaryRequest() {
   summary = null;
   if (summaryRequest != null && summaryRequest.isPending()) {
     summaryRequest.cancel();
     summaryRequest = null;
   }
 }
 public void cancelCurrentRequests() {
   if (this.model.isLive()) {
     this.stopLiveOutput();
   } else {
     for (Request req : this.taskOutputRequests.values()) {
       req.cancel();
     }
     this.taskOutputRequests.clear();
   }
 }
Exemple #3
0
  @Override
  public void cancelHttpRequest(HttpRequest httpRequest) {
    HttpResponseListener httpResponseListener = listeners.get(httpRequest);
    Request request = requests.get(httpRequest);

    if (httpResponseListener != null && request != null) {
      request.cancel();
      httpResponseListener.cancelled();
      requests.remove(httpRequest);
      listeners.remove(httpRequest);
    }
  }
    private void removeTransientDatasource() {
      if (importConfig == null) return;
      if (transientRequest != null) {
        transientRequest.cancel();
        transientRequest = null;
      }
      if (diffRequest != null) {
        diffRequest.cancel();
        diffRequest = null;
      }

      deleteTransientDatasource();
      importConfig = null;
    }
Exemple #5
0
 public void onResponseReceived(Request request, Response response) {
   if (200 == response.getStatusCode()) {
     addTreeItems(response);
     if (treeItem.getText().equals(constants.rootItemDescription()))
       treeItem.setState(true, true);
   } else {
     GWT.log("ResourceTree - Couldn't retrieve JSON for request : " + request.toString(), null);
   }
 }
Exemple #6
0
 private boolean hasSummaryOrPendingRequest() {
   return summary != null || summaryRequest != null && summaryRequest.isPending();
 }
Exemple #7
0
 public void onError(Request request, Throwable exception) {
   GWT.log("ResourceGrids  - on error for request : " + request.toString(), null);
 }
 public void onCancel() {
   if ((currHttpRequest != null) && (currHttpRequest.isPending())) {
     currHttpRequest.cancel();
     Window.alert("Cancelling RPC");
   }
 }
Exemple #9
0
 @Override
 public boolean isPending() {
   return delegate != null ? delegate.isPending() : false;
 }
Exemple #10
0
 @Override
 public void cancel() {
   if (delegate != null) {
     delegate.cancel();
   }
 }