Class DefaultRequestTransport
java.lang.Object
com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport
- All Implemented Interfaces:
RequestTransport
An implementation of
RequestTransport
that uses a
RequestBuilder
.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.web.bindery.requestfactory.shared.RequestTransport
RequestTransport.TransportReceiver
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The default URL for a DefaultRequestTransport is
which may be overridden by callingGWT.getHostPageBaseURL()
+ "gwtRequest"setRequestUrl(String)
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureRequestBuilder
(RequestBuilder builder) Override to change the headers sent in the HTTP request.protected RequestBuilder
Constructs aRequestBuilder
using theRequestBuilder.POST
method sent to the URL returned fromgetRequestUrl()
.protected RequestCallback
Creates a RequestCallback that maps the HTTP response onto theTransportReceiver
interface.Returns the current URL used by this transport.void
send
(String payload, RequestTransport.TransportReceiver receiver) Called by the RequestFactory implementation.void
setRequestUrl
(String url) Override the default URL used by this transport.
-
Field Details
-
URL
The default URL for a DefaultRequestTransport is
which may be overridden by callingGWT.getHostPageBaseURL()
+ "gwtRequest"setRequestUrl(String)
.- See Also:
-
-
Constructor Details
-
DefaultRequestTransport
public DefaultRequestTransport()
-
-
Method Details
-
getRequestUrl
Returns the current URL used by this transport.- Returns:
- the URL as a String
- See Also:
-
setRequestUrl
Override the default URL used by this transport.- Parameters:
url
- a String URL- See Also:
-
configureRequestBuilder
Override to change the headers sent in the HTTP request.- Parameters:
builder
- aRequestBuilder
instance
-
createRequestBuilder
Constructs aRequestBuilder
using theRequestBuilder.POST
method sent to the URL returned fromgetRequestUrl()
.- Returns:
- a
RequestBuilder
instance
-