GWT 2.7.0

## com.google.web.bindery.requestfactory.gwt.client
Class DefaultRequestTransport

    java.lang.Object
      com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport

All Implemented Interfaces:
  RequestTransport

    public class DefaultRequestTransport

extends java.lang.Object
implements 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
`static java.lang.String` | `URL` The default URL for a DefaultRequestTransport is ``GWT.getHostPageBaseURL()` + "gwtRequest"` which may be overridden by calling `setRequestUrl(String)`.

Constructor Summary
`DefaultRequestTransport()`

Method Summary
`protected void` | `configureRequestBuilder(RequestBuilder builder)` Override to change the headers sent in the HTTP request.
`protected RequestBuilder` | `createRequestBuilder()` Constructs a `RequestBuilder` using the `RequestBuilder.POST` method sent to the URL returned from `getRequestUrl()`.
`protected RequestCallback` | `createRequestCallback(RequestTransport.TransportReceiver receiver)` Creates a RequestCallback that maps the HTTP response onto the `TransportReceiver` interface.
`java.lang.String` | `getRequestUrl()` Returns the current URL used by this transport.
`void` | `send(java.lang.String payload, RequestTransport.TransportReceiver receiver)` Called by the RequestFactory implementation.
`void` | `setRequestUrl(java.lang.String url)` Override the default URL used by this transport.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### URL

    public static final java.lang.String URL

  The default URL for a DefaultRequestTransport is ``GWT.getHostPageBaseURL()` + "gwtRequest"` which may be overridden by calling `setRequestUrl(String)`.

  See Also:
    Constant Field Values

Constructor Detail

### DefaultRequestTransport

    public DefaultRequestTransport()

Method Detail

### getRequestUrl

    public java.lang.String getRequestUrl()

  Returns the current URL used by this transport.

  Returns:
    the URL as a String
  See Also:
    `setRequestUrl(String)`

### send

    public void send(java.lang.String payload,
                     RequestTransport.TransportReceiver receiver)

  Description copied from interface: `RequestTransport`
  Called by the RequestFactory implementation.

  Specified by:
    `send` in interface `RequestTransport`
  Parameters:
    `payload` - the String payload
    `receiver` - the `RequestTransport.TransportReceiver` instance that will receive the payload

### setRequestUrl

    public void setRequestUrl(java.lang.String url)

  Override the default URL used by this transport.

  Parameters:
    `url` - a String URL
  See Also:
    `getRequestUrl()`

### configureRequestBuilder

    protected void configureRequestBuilder(RequestBuilder builder)

  Override to change the headers sent in the HTTP request.

  Parameters:
    `builder` - a `RequestBuilder` instance

### createRequestBuilder

    protected RequestBuilder createRequestBuilder()

  Constructs a `RequestBuilder` using the `RequestBuilder.POST` method sent to the URL returned from `getRequestUrl()`.

  Returns:
    a `RequestBuilder` instance

### createRequestCallback

    protected RequestCallback createRequestCallback(RequestTransport.TransportReceiver receiver)

  Creates a RequestCallback that maps the HTTP response onto the `TransportReceiver` interface.

  Parameters:
    `receiver` - a `TransportReceiver`
  Returns:
    a `RequestCallback` instance

GWT 2.7.0