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: Fri, 5 May 2006 17:40:20 +0200

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




Le 5 mai 06 à 14:51, Chris Burdess a écrit :

Cedric Hyppolite wrote:
I don't want an asynchronous IO interface to NNTP, I want a listener call as the internal implementation iterates over the lines giving the newsgroup names. It seems like the GroupIterator is reading the response from the server line by line and creating folder from each answer.

If that's right, I guess that a listener call on each iteration of this GroupIterator whould give the enable the listing of groups before all of them are received.

Sure. Just submit patches against CVS HEAD of the inetlib and mail modules.
--
犬 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]