Re: Getting newsgroup list in real-time
Cedric Hyppolite <[email protected]> Fri, 5 May 2006 17:40:20 +0200
| Newsgroups | gmane.comp.java.classpath.extensions.discuss |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-8-1032695915
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
Hi,
Here is a patch for NNTPRootFolder + plus an additional interface to
be added in gnu.mail.providers.nntp.
To use it just cast the 'DefaultFolder' to NNTPRootFolder :
ListFolderListener listener = new ListFolderListener() {
public void foundFolder(String folderName) {
System.out.println("Found folder :" + folderName);
}
};
((NNTPRootFolder) root).list(listener);
With this I am able to get 4000 group names in the first minute
instead of waiting around 10 minutes to get the full 40000 groups.
Regards,
Cedric
--Apple-Mail-8-1032695915
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=UTF-8;
delsp=yes;
format=flowed
Le 5 mai 06 =C3=A0 14:51, Chris Burdess a =C3=A9crit :
> Cedric Hyppolite wrote:
>> I don't want an asynchronous IO interface to NNTP, I want a =20
>> listener call as the internal implementation iterates over the =20
>> lines giving the newsgroup names.
>> It seems like the GroupIterator is reading the response from the =20
>> server line by line and creating folder from each answer.
>>
>> If that's right, I guess that a listener call on each iteration of =20=
>> this GroupIterator whould give the enable the listing of groups =20
>> before all of them are received.
>
> Sure. Just submit patches against CVS HEAD of the inetlib and mail =20
> modules.
> --=20
> =E7=8A=AC Chris Burdess
> "They that can give up essential liberty to obtain a little safety
> deserve neither liberty nor safety." - Benjamin Franklin
>
>
>
>
--Apple-Mail-8-1032695915
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Classpathx-discuss mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpathx-discuss
--Apple-Mail-8-1032695915--