Re: Asynchronous HTTP Downloads
Re: Asynchronous HTTP Downloads
- Subject: Re: Asynchronous HTTP Downloads
- From: Hendrik Holtmann <email@hidden>
- Date: Wed, 17 Mar 2010 17:55:58 +0100
Hi Mike,
thanks for the hint. Thats works well. However during implementation/conception I ran into another problem.
I want to start the asynchronous downloads from a DirectAction-Method and as soon as the Async-Downloads are all completed the same DirectAction-Method shall return data (aggregated from the async downloads) as a WOResponse to the client. So the basic logic looks like that
public WOActionResult someDirectAction
{
//get post data from the client
//start several Async-Downloads
//as soon as all Async-Donwloads are completed return a WORepsonse
}
Maybe I miss something, but it's not clear how I can achieve this (especially how to let the Direct-Action-Method wait or something until all async-downloads are completed).
Cheers,
Hendrik
Am 17.03.2010 um 12:44 schrieb Mike Schrag:
> screw wohttpconnection ... use Apache HTTPClient. as far as async vs sync, just run it in thread / executorservice
>
> On Mar 17, 2010, at 7:33 AM, Hendrik Holtmann wrote:
>
>> Hi,
>>
>> I have to download data from external sources in my WebObjects-Application. As the download required several requests from different sources I would like to do this in an asynchronous manner.
>> I looked into WOHTTPConnection and WORequest. I can implement the download using these classes, but it is synchron.
>> In short: I want to do something like I can do with NSURLConnection in Cocoa. Any help would be appreciated.
>>
>> Cheers,
>>
>> Hendrik
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden