Package com.google.gwt.http.client

Examples of com.google.gwt.http.client.RequestException


    catch (JavaScriptException e) {
            if (xmlHttpRequest != null) {
                xmlHttpRequest.abort();
                xmlHttpRequest = null;
            }
      listener.onError(new RequestException(e.getMessage()), false);
    }
  }
View Full Code Here


        } catch (JavaScriptException ex) {
            if (transportRequest != null) {
                transportRequest.abort();
                transportRequest = null;
            }
            listener.onError(new RequestException(ex.getMessage()), false);
        }
    }
View Full Code Here

        LOG.trace().log("Snapshot response recieved: ", response.getText());
        // Pull the snapshot out of the response object and return it using
        // the provided callback function.
        if (response.getStatusCode() != Response.SC_OK) {
          callback.onFailure(
              new RequestException("Got back status code " + response.getStatusCode()));
        } else if (!response.getHeader("Content-Type").startsWith("application/json")) {
          callback.onFailure(new RuntimeException("Fetch service did not return json"));
        } else {
          WaveViewData waveView;
          try {
View Full Code Here

      if(isLogued()){
        log.info("User is logged");
        return arg0.proceed();
      }else{
        log.warning("Trying to invoke "+arg0.getMethod().getName()+" without logging");
        throw new RequestException("Trying to invoke "+arg0.getMethod().getName()+" without logging");
      }
    }
  }
View Full Code Here

  private void callbackFilter(JavaScriptObject array, AsyncCallback<PagedList<T>> callback) {
    callback.onSuccess(new PagedListAdapter(array, convertToType((JsArray) array)));
  }

  private void callback(String errorText, AsyncCallback<T> callback) {
    callback.onFailure(new RequestException(errorText));
  }
View Full Code Here

        try {
          Response response = httpClient(settings, cors);
          int status = response.getStatusCode();
          if (status <= 0 || status >= 400) {
            String statusText = status <= 0 ? "Bad CORS" : response.getStatusText();
            dfd.reject(new RequestException("HTTP ERROR: " + status + " " + statusText + "\n" + response.getText()), null);
          } else {
            dfd.resolve(response, null);
          }
        } catch (Exception e) {
          e.printStackTrace();
View Full Code Here

      } else {
        xmlHttpRequest.open(httpMethod, url);
      }
    } catch (JavaScriptException e) {
      RequestPermissionException requestPermissionException = new RequestPermissionException(url);
      requestPermissionException.initCause(new RequestException(e.getMessage()));
      onError(null, e);
      return;
    }

    JsUtils.prop(xmlHttpRequest, "onprogress", JsUtils.wrapFunction(new Function() {
View Full Code Here

  public void onResponseReceived(Request request, Response response) {
    int status = response.getStatusCode();
    if (status <= 0 || status >= 400) {
      String statusText = status <= 0 ? "Bad CORS" : response.getStatusText();
      onError(request, new RequestException("HTTP ERROR: " + status + " " + statusText + "\n" + response.getText()));
    } else {
      dfd.resolve(response, request);
    }
  }
View Full Code Here

  private void callbackFilter(JavaScriptObject array, AsyncCallback<PagedList<T>> callback) {
    callback.onSuccess(new PagedListAdapter(array, convertToType((JsArray) array)));
  }

  private void callback(String errorText, AsyncCallback<T> callback) {
    callback.onFailure(new RequestException(errorText));
  }
View Full Code Here

      });
      xmlHttpRequest.send();
    }
    catch (JavaScriptException e) {
      xmlHttpRequest = null;
      listener.onError(new RequestException(e.getMessage()), false);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.http.client.RequestException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.