[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ecf-dev] getRemoteServiceReferences...adding non-blocking impl
|
Scott Lewis wrote:
> public void requestRemoteServiceReferences(ID[] ids, String className,
> String filter, IRemoteServiceListener listener)
>
> that would not block, but asynchronously notify the listener when remote
> service references were received. Another design for such a
> non-blocking lookup method would be:
>
> public AsynchResult requestRemoteServiceReferences(ID[] ids, String
> className, String filter)
>
> The AsynchResult is essentially a 'Future' result...allowing clients to
> access the actual result delivered asynchronous inside of the AsynchResult.
>
> Do people have thoughts about this? I think it would make sense to have
> both a synchronous/blocking getRemoteServiceReferences (as we have now),
> and an asynchrnous lookup method, either via the listener or the
> AsynchResult.
>
> Any thoughts/comments about this issue?
>
> Scott
+1 for public void requestRemoteServiceReferences(ID[] ids, String
className, String filter, IRemoteServiceListener listener)
To me listeners appear to be the more natural/simpler approach in
Eclipse land, whereas AsynchResult just adds extra convenience.
Also AsynchResult is mostly synchronized, thus might be slower.
Just my 2 cents
Markus
P.S. Why not name it getRemoteServiceReferences(ID[] ids, String
className, String filter, IRemoteServiceListener listener). IMO the
additional parameter makes it clear that it is asynchronous.