com.google.gwt.http.client.Request.createResponse()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(616)

本文整理了Java中com.google.gwt.http.client.Request.createResponse方法的一些代码示例,展示了Request.createResponse的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.createResponse方法的具体详情如下:
包路径:com.google.gwt.http.client.Request
类名称:Request
方法名:createResponse

Request.createResponse介绍

[英]Creates a Response instance for the given JavaScript XmlHttpRequest object.
[中]为给定的JavaScript XmlHttpRequest对象创建响应实例。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

  1. void fireOnResponseReceived(RequestCallback callback) {
  2. if (xmlHttpRequest == null) {
  3. // the request has timed out at this point
  4. return;
  5. }
  6. timer.cancel();
  7. /*
  8. * We cannot use cancel here because it would clear the contents of the
  9. * JavaScript XmlHttpRequest object so we manually null out our reference to
  10. * the JavaScriptObject
  11. */
  12. final XMLHttpRequest xhr = xmlHttpRequest;
  13. xmlHttpRequest = null;
  14. Response response = createResponse(xhr);
  15. callback.onResponseReceived(this, response);
  16. }

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. void fireOnResponseReceived(RequestCallback callback) {
  2. if (xmlHttpRequest == null) {
  3. // the request has timed out at this point
  4. return;
  5. }
  6. timer.cancel();
  7. /*
  8. * We cannot use cancel here because it would clear the contents of the
  9. * JavaScript XmlHttpRequest object so we manually null out our reference to
  10. * the JavaScriptObject
  11. */
  12. final XMLHttpRequest xhr = xmlHttpRequest;
  13. xmlHttpRequest = null;
  14. Response response = createResponse(xhr);
  15. callback.onResponseReceived(this, response);
  16. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. void fireOnResponseReceived(RequestCallback callback) {
  2. if (xmlHttpRequest == null) {
  3. // the request has timed out at this point
  4. return;
  5. }
  6. timer.cancel();
  7. /*
  8. * We cannot use cancel here because it would clear the contents of the
  9. * JavaScript XmlHttpRequest object so we manually null out our reference to
  10. * the JavaScriptObject
  11. */
  12. final XMLHttpRequest xhr = xmlHttpRequest;
  13. xmlHttpRequest = null;
  14. Response response = createResponse(xhr);
  15. callback.onResponseReceived(this, response);
  16. }

代码示例来源:origin: io.reinert.requestor.core/requestor-api

  1. public void fireOnResponseReceived(RequestCallback callback) {
  2. if (xmlHttpRequest == null) {
  3. // the request has timed out at this point
  4. return;
  5. }
  6. timer.cancel();
  7. /*
  8. * We cannot use cancel here because it would clear the contents of the
  9. * JavaScript XmlHttpRequest object so we manually null out our reference to
  10. * the JavaScriptObject
  11. */
  12. final XMLHttpRequest xhr = xmlHttpRequest;
  13. xmlHttpRequest = null;
  14. Response response = createResponse(xhr);
  15. callback.onResponseReceived(this, response);
  16. }

相关文章