Package org.apache.commons.net.nntp
Class NewsgroupInfo
- java.lang.Object
-
- org.apache.commons.net.nntp.NewsgroupInfo
-
public final class NewsgroupInfo extends java.lang.ObjectNewsgroupInfo stores information pertaining to a newsgroup returned by the NNTP GROUP, LIST, and NEWGROUPS commands, implemented byselectNewsgroup,listNewsgroups, andlistNewNewsgroupsrespectively.- See Also:
NNTPClient
-
-
Field Summary
Fields Modifier and Type Field Description static intMODERATED_POSTING_PERMISSIONA constant indicating that a newsgroup is moderated.static intPERMITTED_POSTING_PERMISSIONA constant indicating that a newsgroup is public and unmoderated.static intPROHIBITED_POSTING_PERMISSIONA constant indicating that a newsgroup is closed for general posting.static intUNKNOWN_POSTING_PERMISSIONA constant indicating that the posting permission of a newsgroup is unknown.
-
Constructor Summary
Constructors Constructor Description NewsgroupInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetArticleCount()Deprecated.longgetArticleCountLong()Get the estimated number of articles in the newsgroup.intgetFirstArticle()Deprecated.longgetFirstArticleLong()Get the number of the first article in the newsgroup.intgetLastArticle()Deprecated.longgetLastArticleLong()Get the number of the last article in the newsgroup.java.lang.StringgetNewsgroup()Get the newsgroup name.intgetPostingPermission()Get the posting permission of the newsgroup.
-
-
-
Field Detail
-
UNKNOWN_POSTING_PERMISSION
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.- See Also:
- Constant Field Values
-
MODERATED_POSTING_PERMISSION
public static final int MODERATED_POSTING_PERMISSION
A constant indicating that a newsgroup is moderated.- See Also:
- Constant Field Values
-
PERMITTED_POSTING_PERMISSION
public static final int PERMITTED_POSTING_PERMISSION
A constant indicating that a newsgroup is public and unmoderated.- See Also:
- Constant Field Values
-
PROHIBITED_POSTING_PERMISSION
public static final int PROHIBITED_POSTING_PERMISSION
A constant indicating that a newsgroup is closed for general posting.- See Also:
- Constant Field Values
-
-
Method Detail
-
getNewsgroup
public java.lang.String getNewsgroup()
Get the newsgroup name.- Returns:
- The name of the newsgroup.
-
getArticleCountLong
public long getArticleCountLong()
Get the estimated number of articles in the newsgroup. The accuracy of this value will depend on the server implementation.- Returns:
- The estimated number of articles in the newsgroup.
-
getFirstArticleLong
public long getFirstArticleLong()
Get the number of the first article in the newsgroup.- Returns:
- The number of the first article in the newsgroup.
-
getLastArticleLong
public long getLastArticleLong()
Get the number of the last article in the newsgroup.- Returns:
- The number of the last article in the newsgroup.
-
getPostingPermission
public int getPostingPermission()
Get the posting permission of the newsgroup. This will be one of thePOSTING_PERMISSIONconstants.- Returns:
- The posting permission status of the newsgroup.
-
getArticleCount
@Deprecated public int getArticleCount()
Deprecated.
-
getFirstArticle
@Deprecated public int getFirstArticle()
Deprecated.
-
getLastArticle
@Deprecated public int getLastArticle()
Deprecated.
-
-