Java Doc for RequestBuilder.java in  » Ajax » GWT » com » google » gwt » http » client » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » GWT » com.google.gwt.http.client 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.google.gwt.http.client.RequestBuilder

RequestBuilder
public class RequestBuilder (Code)
Builder for constructing com.google.gwt.http.client.Request objects.

By default, this builder is restricted to building HTTP GET and POST requests due to a bug in Safari's implementation of the XmlHttpRequest object.

Please see http://bugs.webkit.org/show_bug.cgi?id=3812 for more details.

Required Module

Modules that use this class should inherit com.google.gwt.http.HTTP.

Inner Class :final public static class Method

Field Summary
final public static  MethodGET
     Specifies that the HTTP GET method should be used.
final public static  MethodPOST
     Specifies that the HTTP POST method should be used.

Constructor Summary
public  RequestBuilder(Method httpMethod, String url)
     Creates a builder using the parameters for configuration.
Parameters:
  httpMethod - HTTP method to use for the request
Parameters:
  url - URL that has already has already been encoded.
protected  RequestBuilder(String httpMethod, String url)
     Creates a builder using the parameters values for configuration.
Parameters:
  httpMethod - HTTP method to use for the request
Parameters:
  url - URL that has already has already been URL encoded.

Method Summary
public  RequestsendRequest(String requestData, RequestCallback callback)
     Sends an HTTP request based on the current builder configuration.
public  voidsetHeader(String header, String value)
     Sets a request header with the given name and value.
public  voidsetPassword(String password)
     Sets the password to use in the request URL.
public  voidsetTimeoutMillis(int timeoutMillis)
     Sets the number of milliseconds to wait for a request to complete.
public  voidsetUser(String user)
     Sets the user name that will be used in the request URL.

Field Detail
GET
final public static Method GET(Code)
Specifies that the HTTP GET method should be used.



POST
final public static Method POST(Code)
Specifies that the HTTP POST method should be used.




Constructor Detail
RequestBuilder
public RequestBuilder(Method httpMethod, String url)(Code)
Creates a builder using the parameters for configuration.
Parameters:
  httpMethod - HTTP method to use for the request
Parameters:
  url - URL that has already has already been encoded. Please seecom.google.gwt.http.client.URL.encode(String) andcom.google.gwt.http.client.URL.encodeComponent(String) forhow to do this.
throws:
  IllegalArgumentException - if the httpMethod or URL are empty
throws:
  NullPointerException - if the httpMethod or the URL are null



RequestBuilder
protected RequestBuilder(String httpMethod, String url)(Code)
Creates a builder using the parameters values for configuration.
Parameters:
  httpMethod - HTTP method to use for the request
Parameters:
  url - URL that has already has already been URL encoded. Please seecom.google.gwt.http.client.URL.encode(String) andcom.google.gwt.http.client.URL.encodeComponent(String) forhow to do this.
throws:
  IllegalArgumentException - if the httpMethod or URL are empty
throws:
  NullPointerException - if the httpMethod or the URL are null

WARNING:This method is provided in order to allow the creation ofHTTP request other than GET and POST to be made. If this is done, thedeveloper must accept that the behavior on Safari is undefined.





Method Detail
sendRequest
public Request sendRequest(String requestData, RequestCallback callback) throws RequestException(Code)
Sends an HTTP request based on the current builder configuration. If no request headers have been set, the header "Content-Type" will be used with a value of "text/plain; charset=utf-8".
Parameters:
  requestData - the data to send as part of the request
Parameters:
  callback - the response handler to be notified when the request failsor completes a Request object that can be used to track the request



setHeader
public void setHeader(String header, String value)(Code)
Sets a request header with the given name and value. If a header with the specified name has already been set then the new value overwrites the current value.
Parameters:
  header - the name of the header
Parameters:
  value - the value of the header
throws:
  NullPointerException - if header or value are null
throws:
  IllegalArgumentException - if header or value are the empty string



setPassword
public void setPassword(String password)(Code)
Sets the password to use in the request URL. This is ignored if there is no user specified.
Parameters:
  password - password to use in the request URL
throws:
  IllegalArgumentException - if the password is empty
throws:
  NullPointerException - if the password is null



setTimeoutMillis
public void setTimeoutMillis(int timeoutMillis)(Code)
Sets the number of milliseconds to wait for a request to complete. Should the request timeout, the com.google.gwt.http.client.RequestCallback.onError(RequestThrowable) method will be called on the callback instance given to the com.google.gwt.http.client.RequestBuilder.sendRequest(StringRequestCallback) method. The callback method will receive an instance of the com.google.gwt.http.client.RequestTimeoutException class as its java.lang.Throwable argument.
Parameters:
  timeoutMillis - number of milliseconds to wait before canceling therequest, a value of zero disables timeouts
throws:
  IllegalArgumentException - if the timeout value is negative



setUser
public void setUser(String user)(Code)
Sets the user name that will be used in the request URL.
Parameters:
  user - user name to use
throws:
  IllegalArgumentException - if the user is empty
throws:
  NullPointerException - if the user is null



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.