|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.macromedia.net.HttpAgent
An HttpAgent is an object which knows how to collect up a bunch of requests and then make them all at once in a threaded nature.
In general you add requests to the agent, and then call processRequests() to get back the results
| Constructor Summary | |
HttpAgent()
Construct an HttpAgent object with some defaults: 5 threads and no requests |
|
| Method Summary | |
void |
addRequest(HttpAgentRequest req)
Add a request to the list to process |
ResponseHandler |
getResponseHandler()
Get the current request handler that is attached to this agent. |
int |
getTimeout()
|
java.util.Map |
processRequests()
Process the list of requests in a threaded nature. |
void |
setResponseHandler(ResponseHandler handler)
Set a request handler that will get invoked whenever we are done processing a request. |
void |
setThreadCount(int threadCount)
Set the new thread count. |
void |
setTimeout(int timeout)
Number of seconds this connection can be in progress before it is killed |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HttpAgent()
| Method Detail |
public void addRequest(HttpAgentRequest req)
req - is the request to addpublic void setThreadCount(int threadCount)
threadCount - is the number of threads
that will process our resultpublic ResponseHandler getResponseHandler()
public void setResponseHandler(ResponseHandler handler)
handler - is the handler to set. or
null if we want to not have a handler
public java.util.Map processRequests()
throws java.lang.Exception
java.lang.Exceptionpublic void setTimeout(int timeout)
timeout - is the new timeout in seconds, or -1 for no timeoutpublic int getTimeout()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||