Example usage for com.google.gwt.xhr.client XMLHttpRequest OPENED

List of usage examples for com.google.gwt.xhr.client XMLHttpRequest OPENED

Introduction

In this page you can find the example usage for com.google.gwt.xhr.client XMLHttpRequest OPENED.

Prototype

int OPENED

To view the source code for com.google.gwt.xhr.client XMLHttpRequest OPENED.

Click Source Link

Document

The OPENED state is the state of the object when the open() method has been successfully invoked.

Usage

From source file:com.gwtpro.html5.fileapi.client.upload.UploadRequest.java

License:Apache License

/**
 * Returns true if this request is waiting for a response.
 * /*from   ww w.  j  a v a 2 s .  c  om*/
 * @return true if this request is waiting for a response
 */
public boolean isPending() {
    if (this.xmlHttpRequest == null) {
        return false;
    }
    int readyState = this.xmlHttpRequest.getReadyState();
    switch (readyState) {
    case XMLHttpRequest.OPENED:
    case XMLHttpRequest.HEADERS_RECEIVED:
    case XMLHttpRequest.LOADING:
        return true;
    }
    return false;
}