35 |
*/ |
*/ |
36 |
public interface NNTPConstants |
public interface NNTPConstants |
37 |
{ |
{ |
38 |
|
|
39 |
/** |
/** |
40 |
* Indicates a line of help text. |
* Indicates a line of help text. |
41 |
*/ |
*/ |
45 |
* Indicates a DATE response. |
* Indicates a DATE response. |
46 |
*/ |
*/ |
47 |
public static final short DATE_OK = 111; |
public static final short DATE_OK = 111; |
48 |
|
|
49 |
/** |
/** |
50 |
* Indicates that the server is ready and posting is allowed. |
* Indicates that the server is ready and posting is allowed. |
51 |
*/ |
*/ |
52 |
public static final short POSTING_ALLOWED = 200; |
public static final short POSTING_ALLOWED = 200; |
53 |
|
|
54 |
/** |
/** |
55 |
* Indicates that the server is ready but posting is not allowed. |
* Indicates that the server is ready but posting is not allowed. |
56 |
*/ |
*/ |
57 |
public static final short NO_POSTING_ALLOWED = 201; |
public static final short NO_POSTING_ALLOWED = 201; |
58 |
|
|
59 |
/** |
/** |
60 |
* Indicates that the server has noted the slave status of the connection. |
* Indicates that the server has noted the slave status of the connection. |
61 |
*/ |
*/ |
65 |
* Indicates that the server has accepted streaming mode. |
* Indicates that the server has accepted streaming mode. |
66 |
*/ |
*/ |
67 |
public static final short STREAMING_OK = 203; |
public static final short STREAMING_OK = 203; |
68 |
|
|
69 |
/** |
/** |
70 |
* Indicates that the server is closing the connection. |
* Indicates that the server is closing the connection. |
71 |
*/ |
*/ |
72 |
public static final short CLOSING_CONNECTION = 205; |
public static final short CLOSING_CONNECTION = 205; |
73 |
|
|
74 |
/** |
/** |
75 |
* Indicates that the newsgroup was successfully selected. |
* Indicates that the newsgroup was successfully selected. |
76 |
* Format of the message is "<tt>n f l s</tt> xxx" |
* Format of the message is "<tt>n f l s</tt> xxx" |
80 |
* <tt>s</tt> = name of the group.) |
* <tt>s</tt> = name of the group.) |
81 |
*/ |
*/ |
82 |
public static final short GROUP_SELECTED = 211; |
public static final short GROUP_SELECTED = 211; |
83 |
|
|
84 |
/** |
/** |
85 |
* Indicates that a list of valid newsgroups follows. |
* Indicates that a list of valid newsgroups follows. |
86 |
* The format of each following line is "<tt>g l f p</tt>" |
* The format of each following line is "<tt>g l f p</tt>" |
91 |
* 'n' otherwise) |
* 'n' otherwise) |
92 |
*/ |
*/ |
93 |
public static final short LIST_FOLLOWS = 215; |
public static final short LIST_FOLLOWS = 215; |
94 |
|
|
95 |
/** |
/** |
96 |
* Indicates that the article has been retrieved. |
* Indicates that the article has been retrieved. |
97 |
* The head and body of the article follow. |
* The head and body of the article follow. |
98 |
*/ |
*/ |
99 |
public static final short ARTICLE_FOLLOWS = 220; |
public static final short ARTICLE_FOLLOWS = 220; |
100 |
|
|
101 |
/** |
/** |
102 |
* Indicates that the article has been retrieved. |
* Indicates that the article has been retrieved. |
103 |
* The head of the article follows. |
* The head of the article follows. |
104 |
*/ |
*/ |
105 |
public static final short HEAD_FOLLOWS = 221; |
public static final short HEAD_FOLLOWS = 221; |
106 |
|
|
107 |
/** |
/** |
108 |
* Indicates that the article has been retrieved. |
* Indicates that the article has been retrieved. |
109 |
* The body of the article follows. |
* The body of the article follows. |
110 |
*/ |
*/ |
111 |
public static final short BODY_FOLLOWS = 222; |
public static final short BODY_FOLLOWS = 222; |
112 |
|
|
113 |
/** |
/** |
114 |
* Indicates that the article has been retrieved. |
* Indicates that the article has been retrieved. |
115 |
* The text of the article must be requested separately. |
* The text of the article must be requested separately. |
120 |
* Indicates that a listing of overview information follows. |
* Indicates that a listing of overview information follows. |
121 |
*/ |
*/ |
122 |
public static final short OVERVIEW_FOLLOWS = 224; |
public static final short OVERVIEW_FOLLOWS = 224; |
123 |
|
|
124 |
/** |
/** |
125 |
* Indicates that a list of new articles by message-id follows. |
* Indicates that a list of new articles by message-id follows. |
126 |
*/ |
*/ |
127 |
public static final short NEWNEWS_LIST_FOLLOWS = 230; |
public static final short NEWNEWS_LIST_FOLLOWS = 230; |
128 |
|
|
129 |
/** |
/** |
130 |
* Indicates that a list of new newsgroups follows. |
* Indicates that a list of new newsgroups follows. |
131 |
* This code is issued following a successful NEWGROUPS command. The |
* This code is issued following a successful NEWGROUPS command. The |
132 |
* format of the listing is the same as for code 215 (list follows). |
* format of the listing is the same as for code 215 (list follows). |
133 |
*/ |
*/ |
134 |
public static final short NEWGROUPS_LIST_FOLLOWS = 231; |
public static final short NEWGROUPS_LIST_FOLLOWS = 231; |
135 |
|
|
136 |
/** |
/** |
137 |
* Indicates that the article was correctly transferred. |
* Indicates that the article was correctly transferred. |
138 |
*/ |
*/ |
149 |
* TAKETHIS command. |
* TAKETHIS command. |
150 |
*/ |
*/ |
151 |
public static final short ARTICLE_TRANSFERRED_OK = 239; |
public static final short ARTICLE_TRANSFERRED_OK = 239; |
152 |
|
|
153 |
/** |
/** |
154 |
* Indicates that the article was successfully posted. |
* Indicates that the article was successfully posted. |
155 |
*/ |
*/ |
164 |
* Indicates that AUTHINFO authentication was successful. |
* Indicates that AUTHINFO authentication was successful. |
165 |
*/ |
*/ |
166 |
public static final short AUTHINFO_OK = 281; |
public static final short AUTHINFO_OK = 281; |
167 |
|
|
168 |
/** |
/** |
169 |
* Indicates that the article to be transferred should be sent by the |
* Indicates that the article to be transferred should be sent by the |
170 |
* client. It should end with a CRLF-dot-CRLF sequence, i.e. a dot on a |
* client. It should end with a CRLF-dot-CRLF sequence, i.e. a dot on a |
171 |
* line by itself. |
* line by itself. |
172 |
*/ |
*/ |
173 |
public static final short SEND_TRANSFER_ARTICLE = 335; |
public static final short SEND_TRANSFER_ARTICLE = 335; |
174 |
|
|
175 |
/** |
/** |
176 |
* Indicates that the article to be posted should be sent by the |
* Indicates that the article to be posted should be sent by the |
177 |
* client. It should end with a CRLF-dot-CRLF sequence, i.e. a dot on a |
* client. It should end with a CRLF-dot-CRLF sequence, i.e. a dot on a |
189 |
* Indicates that the server is ready to accept the AUTHINFO password. |
* Indicates that the server is ready to accept the AUTHINFO password. |
190 |
*/ |
*/ |
191 |
public static final short SEND_AUTHINFOPASS = 381; |
public static final short SEND_AUTHINFOPASS = 381; |
192 |
|
|
193 |
/** |
/** |
194 |
* Indicates that the service has been discontinued. |
* Indicates that the service has been discontinued. |
195 |
*/ |
*/ |
196 |
public static final short SERVICE_DISCONTINUED = 400; |
public static final short SERVICE_DISCONTINUED = 400; |
197 |
|
|
198 |
/** |
/** |
199 |
* Indicates that no such newsgroup exists. |
* Indicates that no such newsgroup exists. |
200 |
*/ |
*/ |
201 |
public static final short NO_SUCH_GROUP = 411; |
public static final short NO_SUCH_GROUP = 411; |
202 |
|
|
203 |
/** |
/** |
204 |
* Indicates that no newsgroup has been selected. |
* Indicates that no newsgroup has been selected. |
205 |
*/ |
*/ |
206 |
public static final short NO_GROUP_SELECTED = 412; |
public static final short NO_GROUP_SELECTED = 412; |
207 |
|
|
208 |
/** |
/** |
209 |
* Indicates that no article has been selected. |
* Indicates that no article has been selected. |
210 |
*/ |
*/ |
211 |
public static final short NO_ARTICLE_SELECTED = 420; |
public static final short NO_ARTICLE_SELECTED = 420; |
212 |
|
|
213 |
/** |
/** |
214 |
* Indicates that there is no next article in this newsgroup. |
* Indicates that there is no next article in this newsgroup. |
215 |
*/ |
*/ |
216 |
public static final short NO_NEXT_ARTICLE = 421; |
public static final short NO_NEXT_ARTICLE = 421; |
217 |
|
|
218 |
/** |
/** |
219 |
* Indicates that there is no previous article in this newsgroup. |
* Indicates that there is no previous article in this newsgroup. |
220 |
*/ |
*/ |
221 |
public static final short NO_PREVIOUS_ARTICLE = 422; |
public static final short NO_PREVIOUS_ARTICLE = 422; |
222 |
|
|
223 |
/** |
/** |
224 |
* Indicates that no article with the specified number exists in this |
* Indicates that no article with the specified number exists in this |
225 |
* newsgroup. |
* newsgroup. |
226 |
*/ |
*/ |
227 |
public static final short NO_SUCH_ARTICLE_NUMBER = 423; |
public static final short NO_SUCH_ARTICLE_NUMBER = 423; |
228 |
|
|
229 |
/** |
/** |
230 |
* Indicates that the specified article could not be found. |
* Indicates that the specified article could not be found. |
231 |
*/ |
*/ |
236 |
* article, but may become so at a later stage. |
* article, but may become so at a later stage. |
237 |
*/ |
*/ |
238 |
public static final short TRY_AGAIN_LATER = 431; |
public static final short TRY_AGAIN_LATER = 431; |
239 |
|
|
240 |
/** |
/** |
241 |
* Indicates that the server does not want the specified article. |
* Indicates that the server does not want the specified article. |
242 |
* The client should not send the article. |
* The client should not send the article. |
243 |
*/ |
*/ |
244 |
public static final short ARTICLE_NOT_WANTED = 435; |
public static final short ARTICLE_NOT_WANTED = 435; |
245 |
|
|
246 |
/** |
/** |
247 |
* Indicates that transfer of the specified article failed. |
* Indicates that transfer of the specified article failed. |
248 |
* The client should try to send the article again later. |
* The client should try to send the article again later. |
249 |
*/ |
*/ |
250 |
public static final short TRANSFER_FAILED = 436; |
public static final short TRANSFER_FAILED = 436; |
251 |
|
|
252 |
/** |
/** |
253 |
* Indicates that the specified article was rejected. |
* Indicates that the specified article was rejected. |
254 |
* The client should not attempt to send the article again. |
* The client should not attempt to send the article again. |
265 |
* Indicates that an article transferred by a TAKETHIS command failed. |
* Indicates that an article transferred by a TAKETHIS command failed. |
266 |
*/ |
*/ |
267 |
public static final short ARTICLE_TRANSFER_FAILED = 439; |
public static final short ARTICLE_TRANSFER_FAILED = 439; |
268 |
|
|
269 |
/** |
/** |
270 |
* Indicates that posting is not allowed. |
* Indicates that posting is not allowed. |
271 |
*/ |
*/ |
272 |
public static final short POSTING_NOT_ALLOWED = 440; |
public static final short POSTING_NOT_ALLOWED = 440; |
273 |
|
|
274 |
/** |
/** |
275 |
* Indicates that posting of the article failed. |
* Indicates that posting of the article failed. |
276 |
* The client may attempt to post the article again. |
* The client may attempt to post the article again. |
304 |
* by the server. |
* by the server. |
305 |
*/ |
*/ |
306 |
public static final short AUTHINFO_REJECTED = 482; |
public static final short AUTHINFO_REJECTED = 482; |
307 |
|
|
308 |
/** |
/** |
309 |
* Indicates that the command sent by the client was not understood by the |
* Indicates that the command sent by the client was not understood by the |
310 |
* server. |
* server. |
311 |
*/ |
*/ |
312 |
public static final short COMMAND_NOT_RECOGNIZED = 500; |
public static final short COMMAND_NOT_RECOGNIZED = 500; |
313 |
|
|
314 |
/** |
/** |
315 |
* Indicates that the command sent by the client was not a valid NNTP |
* Indicates that the command sent by the client was not a valid NNTP |
316 |
* command. |
* command. |
317 |
*/ |
*/ |
318 |
public static final short SYNTAX_ERROR = 501; |
public static final short SYNTAX_ERROR = 501; |
319 |
|
|
320 |
/** |
/** |
321 |
* Indicates that access restrictions deny permission to execute the |
* Indicates that access restrictions deny permission to execute the |
322 |
* command sent by the client. |
* command sent by the client. |
323 |
*/ |
*/ |
324 |
public static final short PERMISSION_DENIED = 502; |
public static final short PERMISSION_DENIED = 502; |
325 |
|
|
326 |
/** |
/** |
327 |
* Indicates that the server was unable to perform the command due to an |
* Indicates that the server was unable to perform the command due to an |
328 |
* internal error. |
* internal error. |
329 |
*/ |
*/ |
330 |
public static final short INTERNAL_ERROR = 503; |
public static final short INTERNAL_ERROR = 503; |
331 |
|
|
332 |
// -- Client commands -- |
// -- Client commands -- |
333 |
|
|
334 |
public static final String ARTICLE = "ARTICLE"; |
public static final String ARTICLE = "ARTICLE"; |
335 |
public static final String AUTHINFO_USER = "AUTHINFO USER"; |
public static final String AUTHINFO_USER = "AUTHINFO USER"; |
336 |
public static final String AUTHINFO_PASS = "AUTHINFO PASS"; |
public static final String AUTHINFO_PASS = "AUTHINFO PASS"; |
359 |
public static final String NEWGROUPS = "NEWGROUPS"; |
public static final String NEWGROUPS = "NEWGROUPS"; |
360 |
public static final String NEWNEWS = "NEWNEWS"; |
public static final String NEWNEWS = "NEWNEWS"; |
361 |
public static final String NEXT = "NEXT"; |
public static final String NEXT = "NEXT"; |
362 |
public static final String POST = "POST"; |
public static final String POST = "POST"; |
363 |
public static final String QUIT = "QUIT"; |
public static final String QUIT = "QUIT"; |
364 |
public static final String SLAVE = "SLAVE"; |
public static final String SLAVE = "SLAVE"; |
365 |
public static final String TAKETHIS = "TAKETHIS"; |
public static final String TAKETHIS = "TAKETHIS"; |
371 |
public static final String XPATH = "XPATH"; |
public static final String XPATH = "XPATH"; |
372 |
public static final String XREPLIC = "XREPLIC"; |
public static final String XREPLIC = "XREPLIC"; |
373 |
public static final String XROVER = "XROVER"; |
public static final String XROVER = "XROVER"; |
374 |
|
|
375 |
} |
} |