classpathx-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Classpathx-discuss] Getting newsgroup list in real-time


From: Cedric Hyppolite
Subject: Re: [Classpathx-discuss] Getting newsgroup list in real-time
Date: Wed, 2 Aug 2006 21:20:43 +0200

When actually using this listener, I found out that receiving the Folder object instead of just its name is better. I keep a mapping of the news server folder structure with reference to javamail Folder objects.

I modified my copy, but I guess it would be better to modify the CVS repository if you think that this feature is useful for other people.

Thanks,
Cédric

Le 5 mai 06 à 18:21, Chris Burdess a écrit :

Cedric Hyppolite wrote:
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.

I committed this patch, after applying GNU formatting, adding a licence header and ChangeLog entry, and updating the makefile to include the new source file.

Thanks
--
犬 Chris Burdess
  "They that can give up essential liberty to obtain a little safety
  deserve neither liberty nor safety." - Benjamin Franklin









reply via email to

[Prev in Thread] Current Thread [Next in Thread]