commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chemi <jmor...@terra.es>
Subject Re: [Commons-net NTTP]: Problem getting info of a Newsgroup
Date Fri, 05 Nov 2004 16:22:34 GMT
Sorry. My previous note was not accurate.
When I get the list, I don't see that info in the console (I don't know 
why but it seems the client doesn't select the newsgroup). I see that 
info when I select the newsgroup:

    NNTPClient client = new NNTPClient();
    client.addProtocolCommandListener(new DebugCommandListener(logger));
    client.connect(this.host, this.port);
    client.selectNewsgroup(this.newsgroup);
    .....

But the question/problem still the same. Why getArticleCount() returns 1 
if the server said 0.

Thanks,

    Chemi.

Chemi wrote:

> Hi, I am getting the list of newsgroups from a NNTP Server (James 
> v2.2.0) with:
>
>    NNTPClient client = new NNTPClient();
>    client.addProtocolCommandListener(new DebugCommandListener(logger));
>    client.connect(this.host,this.port);
>    NewsgroupInfo[] newsgroupInfo = client.listNewsgroups();
>    ......
>
> DebugCommandListener is a class which prints in the console all the 
> NNTP Protocol traffic. In my case, I have some newsgroups with zero 
> articles so I see this answer from the server in the console:
>
>    211 0 0 0 org.apache.james.user group selected
>
> But when I get the total number of articles with:
>
>    newsgrouInfo[x].getArticlecount()
>
> it returns 1. And it should return 0. Right?
>
> Is this a known bug? Am I missing anything? Reading javadoc 
> information, I see "Get the estimated number of articles in the 
> newsgroup. The accuracy of this value will depend on the server 
> implementation.". But as I said when I print the answer from the 
> server I can see 0 as the number of articles.
>
> By the way, I am using commons-net 1.2.2
>
> Thanks in advance,
>
>    Chemi. 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message