Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.lobobrowser.html.test.SimpleHttpRequest
SimpleHttpRequest
class implements
the HttpRequest
interface.
The HttpRequest
implementation provided
by this class is simple, with no caching. It creates
a new thread for each new asynchronous request.
Field Summary | |
protected java.net.URLConnection |
|
protected String |
|
protected Map |
|
Fields inherited from interface org.lobobrowser.html.HttpRequest | |
STATE_COMPLETE , STATE_INTERACTIVE , STATE_LOADED , STATE_LOADING , STATE_UNINITIALIZED |
Constructor Summary | |
|
Method Summary | |
void |
|
void | |
String | |
int | |
byte[] | |
String |
|
Image | |
String | |
Document | |
int | |
String | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
protected void |
|
protected java.net.URLConnection connection
TheURLConnection
is assigned to this field while it is ongoing.
protected String responseHeaders
Response headers are set in this string after a response is received.
protected Map responseHeadersMap
Response headers are set in this map after a response is received.
public void addReadyStateChangeListener(ReadyStateChangeListener listener)
- Specified by:
- addReadyStateChangeListener in interface HttpRequest
public String getAllResponseHeaders()
- Specified by:
- getAllResponseHeaders in interface HttpRequest
public byte[] getResponseBytes()
- Specified by:
- getResponseBytes in interface HttpRequest
public String getResponseHeader(String headerName)
- Specified by:
- getResponseHeader in interface HttpRequest
public Image getResponseImage()
- Specified by:
- getResponseImage in interface HttpRequest
public void open(String method, String url, boolean asyncFlag)
- Specified by:
- open in interface HttpRequest
public void open(String method, String url, boolean asyncFlag, String userName)
- Specified by:
- open in interface HttpRequest
public void open(String method, String url, boolean asyncFlag, String userName, String password)
- Specified by:
- open in interface HttpRequest
public void open(String method, URL url, boolean asyncFlag)
- Specified by:
- open in interface HttpRequest
public void open(String method, java.net.URL url, boolean asyncFlag, String userName, String password)
Opens the request by invokingopenSync(String, URL, String, String)
. For asynchronous requests, a new thread is created before proceeding.
- Parameters:
method
- The request method.url
- The request URL.asyncFlag
- Whether the request should be asynchronous.userName
- The user name of the request (not supported.)password
- The password of the request (not supported.)
protected void openSync(String method, java.net.URL url, String userName, String password)
This method performs a synchronous URL connection. It may be overridden.
- Parameters:
method
- The request method.url
- The request URL.userName
- An optional username.password
- An optional password.