Package org.apache.commons.net.nntp
Class NNTPReply
java.lang.Object
org.apache.commons.net.nntp.NNTPReply
NNTPReply stores a set of constants for NNTP reply codes. To interpret the meaning of the codes, familiarity with RFC 977 is assumed. The mnemonic constant
names are transcriptions from the code descriptions of RFC 977.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isInformational
(int reply) Determine if a reply code is an informational response.static boolean
isNegativePermanent
(int reply) Determine if a reply code is a negative permanent response.static boolean
isNegativeTransient
(int reply) Determine if a reply code is a negative transient response.static boolean
isPositiveCompletion
(int reply) Determine if a reply code is a positive completion response.static boolean
isPositiveIntermediate
(int reply) Determine if a reply code is a positive intermediate response.
-
Field Details
-
HELP_TEXT_FOLLOWS
- See Also:
-
DEBUG_OUTPUT
- See Also:
-
SERVER_READY_POSTING_ALLOWED
- See Also:
-
SERVER_READY_POSTING_NOT_ALLOWED
- See Also:
-
SLAVE_STATUS_NOTED
- See Also:
-
CLOSING_CONNECTION
- See Also:
-
GROUP_SELECTED
- See Also:
-
ARTICLE_RETRIEVED_HEAD_AND_BODY_FOLLOW
- See Also:
-
ARTICLE_RETRIEVED_HEAD_FOLLOWS
- See Also:
-
ARTICLE_RETRIEVED_BODY_FOLLOWS
- See Also:
-
ARTICLE_RETRIEVED_REQUEST_TEXT_SEPARATELY
- See Also:
-
ARTICLE_LIST_BY_MESSAGE_ID_FOLLOWS
- See Also:
-
NEW_NEWSGROUP_LIST_FOLLOWS
- See Also:
-
ARTICLE_TRANSFERRED_OK
- See Also:
-
ARTICLE_POSTED_OK
- See Also:
-
AUTHENTICATION_ACCEPTED
- See Also:
-
SEND_ARTICLE_TO_TRANSFER
- See Also:
-
SEND_ARTICLE_TO_POST
- See Also:
-
MORE_AUTH_INFO_REQUIRED
- See Also:
-
SERVICE_DISCONTINUED
- See Also:
-
NO_SUCH_NEWSGROUP
- See Also:
-
NO_NEWSGROUP_SELECTED
- See Also:
-
NO_CURRENT_ARTICLE_SELECTED
- See Also:
-
NO_NEXT_ARTICLE
- See Also:
-
NO_PREVIOUS_ARTICLE
- See Also:
-
NO_SUCH_ARTICLE_NUMBER
- See Also:
-
NO_SUCH_ARTICLE_FOUND
- See Also:
-
ARTICLE_NOT_WANTED
- See Also:
-
TRANSFER_FAILED
- See Also:
-
ARTICLE_REJECTED
- See Also:
-
POSTING_NOT_ALLOWED
- See Also:
-
POSTING_FAILED
- See Also:
-
AUTHENTICATION_REQUIRED
- Since:
- 2.2 - corrected value to 480
- See Also:
-
AUTHENTICATION_REJECTED
- See Also:
-
COMMAND_NOT_RECOGNIZED
- See Also:
-
COMMAND_SYNTAX_ERROR
- See Also:
-
PERMISSION_DENIED
- See Also:
-
PROGRAM_FAULT
- See Also:
-
-
Method Details
-
isInformational
Determine if a reply code is an informational response. All codes beginning with a 1 are positive informational responses. Informational responses are used to provide human readable information such as help text.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is an informational response, false if not.
-
isNegativePermanent
Determine if a reply code is a negative permanent response. All codes beginning with a 5 are negative permanent responses. The NNTP server will send a negative permanent response when it does not implement a command, a command is incorrectly formatted, or a serious program error occurs.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a negative permanent response, false if not.
-
isNegativeTransient
Determine if a reply code is a negative transient response. All codes beginning with a 4 are negative transient responses. The NNTP server will send a negative transient response on the failure of a correctly formatted command that could not be performed for some reason. For example, retrieving an article that does not exist will result in a negative transient response.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a negative transient response, false if not.
-
isPositiveCompletion
Determine if a reply code is a positive completion response. All codes beginning with a 2 are positive completion responses. The NNTP server will send a positive completion response on the final successful completion of a command.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a positive completion response, false if not.
-
isPositiveIntermediate
Determine if a reply code is a positive intermediate response. All codes beginning with a 3 are positive intermediate responses. The NNTP server will send a positive intermediate response on the successful completion of one part of a multi-part command or sequence of commands. For example, after a successful POST command, a positive intermediate response will be sent to indicate that the server is ready to receive the article to be posted.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a positive intermediate response, false if not.
-