Package org.apache.commons.net.nntp
Class NewsgroupInfo
java.lang.Object
org.apache.commons.net.nntp.NewsgroupInfo
NewsgroupInfo stores information pertaining to a newsgroup returned by
the NNTP GROUP, LIST, and NEWGROUPS commands, implemented by
selectNewsgroup
,
listNewsgroups
, and
listNewNewsgroups
respectively.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private long
private long
private String
private int
static final int
A constant indicating that a newsgroup is moderated.static final int
A constant indicating that a newsgroup is public and unmoderated.static final int
A constant indicating that a newsgroup is closed for general posting.static final int
A constant indicating that the posting permission of a newsgroup is unknown. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
_setArticleCount
(long count) (package private) void
_setFirstArticle
(long first) (package private) void
_setLastArticle
(long last) (package private) void
_setNewsgroup
(String newsgroup) (package private) void
_setPostingPermission
(int permission) int
Deprecated.long
Get the estimated number of articles in the newsgroup.int
Deprecated.long
Get the number of the first article in the newsgroup.int
Deprecated.long
Get the number of the last article in the newsgroup.Get the newsgroup name.int
Get the posting permission of the newsgroup.
-
Field Details
-
UNKNOWN_POSTING_PERMISSION
public static final int UNKNOWN_POSTING_PERMISSIONA 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:
-
MODERATED_POSTING_PERMISSION
public static final int MODERATED_POSTING_PERMISSIONA constant indicating that a newsgroup is moderated.- See Also:
-
PERMITTED_POSTING_PERMISSION
public static final int PERMITTED_POSTING_PERMISSIONA constant indicating that a newsgroup is public and unmoderated.- See Also:
-
PROHIBITED_POSTING_PERMISSION
public static final int PROHIBITED_POSTING_PERMISSIONA constant indicating that a newsgroup is closed for general posting.- See Also:
-
__newsgroup
-
__estimatedArticleCount
private long __estimatedArticleCount -
__firstArticle
private long __firstArticle -
__lastArticle
private long __lastArticle -
__postingPermission
private int __postingPermission
-
-
Constructor Details
-
NewsgroupInfo
public NewsgroupInfo()
-
-
Method Details
-
_setNewsgroup
-
_setArticleCount
void _setArticleCount(long count) -
_setFirstArticle
void _setFirstArticle(long first) -
_setLastArticle
void _setLastArticle(long last) -
_setPostingPermission
void _setPostingPermission(int permission) -
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_PERMISSION
constants.- Returns:
- The posting permission status of the newsgroup.
-
getArticleCount
Deprecated. -
getFirstArticle
Deprecated. -
getLastArticle
Deprecated.
-