示例#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();
   }
 }
示例#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);
    }
  }
示例#4
0
    private void removeTransientDatasource() {
      if (importConfig == null) return;
      if (transientRequest != null) {
        transientRequest.cancel();
        transientRequest = null;
      }
      if (diffRequest != null) {
        diffRequest.cancel();
        diffRequest = null;
      }

      deleteTransientDatasource();
      importConfig = null;
    }
示例#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);
   }
 }
示例#6
0
 private boolean hasSummaryOrPendingRequest() {
   return summary != null || summaryRequest != null && summaryRequest.isPending();
 }
示例#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");
   }
 }
示例#9
0
 @Override
 public boolean isPending() {
   return delegate != null ? delegate.isPending() : false;
 }
示例#10
0
 @Override
 public void cancel() {
   if (delegate != null) {
     delegate.cancel();
   }
 }