com.google.gwt.user.client.rpc.impl
Class FailingRequestBuilder

java.lang.Object
  extended by com.google.gwt.http.client.RequestBuilder
      extended by com.google.gwt.user.client.rpc.impl.FailingRequestBuilder

public class FailingRequestBuilder
extends RequestBuilder

A RequestBuilder that always immediately fails.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.http.client.RequestBuilder
RequestBuilder.Method
 
Field Summary
 
Fields inherited from class com.google.gwt.http.client.RequestBuilder
DELETE, GET, HEAD, POST, PUT
 
Constructor Summary
FailingRequestBuilder(java.lang.Throwable cause, AsyncCallback<?> rpcCallback)
           
 
Method Summary
 Request send()
          Sends an HTTP request based on the current builder configuration.
 Request sendRequest(java.lang.String requestData, RequestCallback callback)
          Sends an HTTP request based on the current builder configuration with the specified data and callback.
 
Methods inherited from class com.google.gwt.http.client.RequestBuilder
getCallback, getHeader, getHTTPMethod, getPassword, getRequestData, getTimeoutMillis, getUrl, getUser, setCallback, setHeader, setPassword, setRequestData, setTimeoutMillis, setUser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailingRequestBuilder

public FailingRequestBuilder(java.lang.Throwable cause,
                             AsyncCallback<?> rpcCallback)
Method Detail

send

public Request send()
             throws RequestException
Description copied from class: RequestBuilder
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". You must call RequestBuilder.setRequestData(String) and RequestBuilder.setCallback(RequestCallback) before calling this method.

Overrides:
send in class RequestBuilder
Returns:
a Request object that can be used to track the request
Throws:
RequestException - if the call fails to initiate

sendRequest

public Request sendRequest(java.lang.String requestData,
                           RequestCallback callback)
                    throws RequestException
Description copied from class: RequestBuilder
Sends an HTTP request based on the current builder configuration with the specified data and callback. If no request headers have been set, the header "Content-Type" will be used with a value of "text/plain; charset=utf-8". This method does not cache requestData or callback.

Overrides:
sendRequest in class RequestBuilder
Parameters:
requestData - the data to send as part of the request
callback - the response handler to be notified when the request fails or completes
Returns:
a Request object that can be used to track the request
Throws:
RequestException