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
FieldsModifier and TypeFieldDescriptionstatic final StringThe default URL for a DefaultRequestTransport iswhich may be overridden by callingGWT.getHostPageBaseURL()+ "gwtRequest"setRequestUrl(String). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureRequestBuilder(RequestBuilder builder) Override to change the headers sent in the HTTP request.protected RequestBuilderConstructs aRequestBuilderusing theRequestBuilder.POSTmethod sent to the URL returned fromgetRequestUrl().protected RequestCallbackCreates a RequestCallback that maps the HTTP response onto theTransportReceiverinterface.Returns the current URL used by this transport.voidsend(String payload, RequestTransport.TransportReceiver receiver) Called by the RequestFactory implementation.voidsetRequestUrl(String url) Override the default URL used by this transport.
-
Field Details
-
URL
The default URL for a DefaultRequestTransport iswhich 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- aRequestBuilderinstance
-
createRequestBuilder
Constructs aRequestBuilderusing theRequestBuilder.POSTmethod sent to the URL returned fromgetRequestUrl().- Returns:
- a
RequestBuilderinstance
-