|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.web.bindery.requestfactory.vm.testing.UrlRequestTransport
public class UrlRequestTransport
A trivial implementation of RequestTransport that uses a
HttpURLConnection. Details of the connection can be amended by
overriding configureConnection(HttpURLConnection).
This implementation only supports http and https URLs. It has
primitive support for recording and playing back cookies, but does not
implement expiration processing.
Developers who wish to build a more production-ready client should consider using a RequestTRansport based around Apache HttpClient instead.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.google.web.bindery.requestfactory.shared.RequestTransport |
|---|
RequestTransport.TransportReceiver |
| Constructor Summary | |
|---|---|
UrlRequestTransport(java.net.URL url)
Construct a new UrlRequestTransport. |
|
| Method Summary | |
|---|---|
protected void |
configureConnection(java.net.HttpURLConnection connection)
|
java.util.Map<java.lang.String,java.lang.String> |
getCookies()
Provides access to the cookies that will be sent for subsequent requests. |
void |
send(java.lang.String payload,
RequestTransport.TransportReceiver receiver)
Called by the RequestFactory implementation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UrlRequestTransport(java.net.URL url)
url - the URL to connect to
java.lang.IllegalArgumentException - if the url's protocol is not http
or https| Method Detail |
|---|
public java.util.Map<java.lang.String,java.lang.String> getCookies()
public void send(java.lang.String payload,
RequestTransport.TransportReceiver receiver)
RequestTransport
send in interface RequestTransportpayload - the String payloadreceiver - the RequestTransport.TransportReceiver instance that will receive
the payload
protected void configureConnection(java.net.HttpURLConnection connection)
throws java.io.IOException
java.io.IOException
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||