本文整理了Java中com.google.gwt.http.client.Request
类的一些代码示例,展示了Request
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request
类的具体详情如下:
包路径:com.google.gwt.http.client.Request
类名称:Request
[英]An HTTP request that is waiting for a response. Requests can be queried for their pending status or they can be canceled.
Modules that use this class should inherit com.google.gwt.http.HTTP
. com/google/gwt/examples/http/InheritsExample.gwt.xml
[中]正在等待响应的HTTP请求。可以查询请求的挂起状态,也可以取消请求。
####必选模块
使用此类的模块应继承com.google.gwt.http.HTTP
。com/google/gwt/examples/http/InheritsExample。gwt。xml
代码示例来源:origin: libgdx/libgdx
@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);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
void fireOnResponseReceived(RequestCallback callback) {
if (xmlHttpRequest == null) {
// the request has timed out at this point
return;
}
timer.cancel();
/*
* We cannot use cancel here because it would clear the contents of the
* JavaScript XmlHttpRequest object so we manually null out our reference to
* the JavaScriptObject
*/
final XMLHttpRequest xhr = xmlHttpRequest;
xmlHttpRequest = null;
Response response = createResponse(xhr);
callback.onResponseReceived(this, response);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public void onReadyStateChange(XMLHttpRequest xhr) {
if (xhr.getReadyState() == XMLHttpRequest.DONE) {
xhr.clearOnReadyStateChange();
request.fireOnResponseReceived(callback);
}
}
});
代码示例来源:origin: org.jboss.errai/errai-bus
while (iterator.hasNext()) {
final RxInfo pendingRx = iterator.next();
if (pendingRx.getRequest().isPending() && pendingRx.isWaiting()) {
if (!pendingRx.getRequest().isPending()) {
iterator.remove();
代码示例来源:origin: com.google.gwt/gwt-servlet
final Request request = new Request(xmlHttpRequest, timeoutMillis, callback);
代码示例来源:origin: ArcBees/GWTP
@Override
public boolean isPending() {
return request.isPending();
}
}
代码示例来源:origin: net.wetheinter/gwt-user
final Request request = new Request(xmlHttpRequest, timeoutMillis, callback);
代码示例来源:origin: libgdx/libgdx
@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);
}
}
代码示例来源:origin: com.ahome-it/ahome-tooling-nativetools
@Override
public final boolean pending()
{
return m_rqst.isPending();
}
代码示例来源:origin: reinert/requestor
public void fireOnResponseReceived(RequestCallback callback) {
super.fireOnResponseReceived(callback);
}
}
代码示例来源:origin: io.reinert.requestor.core/requestor-api
public void fireOnResponseReceived(RequestCallback callback) {
if (xmlHttpRequest == null) {
// the request has timed out at this point
return;
}
timer.cancel();
/*
* We cannot use cancel here because it would clear the contents of the
* JavaScript XmlHttpRequest object so we manually null out our reference to
* the JavaScriptObject
*/
final XMLHttpRequest xhr = xmlHttpRequest;
xmlHttpRequest = null;
Response response = createResponse(xhr);
callback.onResponseReceived(this, response);
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
final Request request = new Request(xmlHttpRequest, timeoutMillis, callback);
代码示例来源:origin: com.google.gwt/gwt-servlet
private void fireOnTimeout() {
if (xmlHttpRequest == null) {
// the request has been received at this point
return;
}
cancel();
callback.onError(this, new RequestTimeoutException(this, timeoutMillis));
}
}
代码示例来源:origin: com.gwtplatform/gwtp-dispatch-common-client
@Override
public boolean isPending() {
return request.isPending();
}
}
代码示例来源:origin: net.wetheinter/gwt-user
public void onReadyStateChange(XMLHttpRequest xhr) {
if (xhr.getReadyState() == XMLHttpRequest.DONE) {
xhr.clearOnReadyStateChange();
request.fireOnResponseReceived(callback);
}
}
});
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
void fireOnResponseReceived(RequestCallback callback) {
if (xmlHttpRequest == null) {
// the request has timed out at this point
return;
}
timer.cancel();
/*
* We cannot use cancel here because it would clear the contents of the
* JavaScript XmlHttpRequest object so we manually null out our reference to
* the JavaScriptObject
*/
final XMLHttpRequest xhr = xmlHttpRequest;
xmlHttpRequest = null;
Response response = createResponse(xhr);
callback.onResponseReceived(this, response);
}
代码示例来源:origin: io.reinert.requestor.core/requestor-api
final com.google.gwt.http.client.Request gwtRequest = new com.google.gwt.http.client.Request(xmlHttpRequest,
request.getTimeout(), callback);
代码示例来源:origin: org.jboss.errai/errai-bus
@Override
public Collection<Message> stop(final boolean stopAllCurrentRequests) {
receiveCommCallback.cancel();
throttleTimer.cancel();
try {
if (stopAllCurrentRequests) {
// Now stop all the in-flight XHRs
for (final RxInfo r : pendingRequests) {
r.getRequest().cancel();
}
pendingRequests.clear();
return new ArrayList<Message>(undeliveredMessages);
}
else {
return Collections.emptyList();
}
}
finally {
undeliveredMessages.clear();
}
}
代码示例来源:origin: jbossas/console
@Override
public boolean isPending() {
return delegate!=null ? delegate.isPending() : false;
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
public void onReadyStateChange(XMLHttpRequest xhr) {
if (xhr.getReadyState() == XMLHttpRequest.DONE) {
xhr.clearOnReadyStateChange();
request.fireOnResponseReceived(callback);
}
}
});
内容来源于网络,如有侵权,请联系作者删除!