예제 #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();
   }
 }