FileDocCategorySizeDatePackage
NewsgroupInfo.javaAPI DocApache Commons NET 1.4.1 API4328Sat Dec 03 10:05:48 GMT 2005org.apache.commons.net.nntp

NewsgroupInfo

public final class NewsgroupInfo extends Object
NewsgroupInfo stores information pertaining to a newsgroup returned by the NNTP GROUP, LIST, and NEWGROUPS commands, implemented by {@link org.apache.commons.net.nntp.NNTPClient#selectNewsgroup selectNewsgroup } , {@link org.apache.commons.net.nntp.NNTPClient#listNewsgroups listNewsgroups } , and {@link org.apache.commons.net.nntp.NNTPClient#listNewNewsgroups listNewNewsgroups } respectively.

author
Daniel F. Savarese
see
NNTPClient

Fields Summary
public static final int
UNKNOWN_POSTING_PERMISSION
A constant indicating that the posting permission of a newsgroup is unknown. For example, the NNTP GROUP command does not return posting information, so NewsgroupInfo instances obtained from that command willhave an UNKNOWN_POSTING_PERMISSION.
public static final int
MODERATED_POSTING_PERMISSION
A constant indicating that a newsgroup is moderated.
public static final int
PERMITTED_POSTING_PERMISSION
A constant indicating that a newsgroup is public and unmoderated.
public static final int
PROHIBITED_POSTING_PERMISSION
A constant indicating that a newsgroup is closed for general posting.
private String
__newsgroup
private int
__estimatedArticleCount
private int
__firstArticle
private int
__lastArticle
private int
__postingPermission
Constructors Summary
Methods Summary
void_setArticleCount(int count)

        __estimatedArticleCount = count;
    
void_setFirstArticle(int first)

        __firstArticle = first;
    
void_setLastArticle(int last)

        __lastArticle = last;
    
void_setNewsgroup(java.lang.String newsgroup)


      
    
        __newsgroup = newsgroup;
    
void_setPostingPermission(int permission)

        __postingPermission = permission;
    
public intgetArticleCount()
Get the estimated number of articles in the newsgroup. The accuracy of this value will depend on the server implementation.

return
The estimated number of articles in the newsgroup.

        return __estimatedArticleCount;
    
public intgetFirstArticle()
Get the number of the first article in the newsgroup.

return
The number of the first article in the newsgroup.

        return __firstArticle;
    
public intgetLastArticle()
Get the number of the last article in the newsgroup.

return
The number of the last article in the newsgroup.

        return __lastArticle;
    
public java.lang.StringgetNewsgroup()
Get the newsgroup name.

return
The name of the newsgroup.

        return __newsgroup;
    
public intgetPostingPermission()
Get the posting permission of the newsgroup. This will be one of the POSTING_PERMISSION constants.

return
The posting permission status of the newsgroup.

        return __postingPermission;