OSDN Git Service

CVS最新版の全ファイルを追加
[spring-ext/ozacc-mail.git] / src / test / com / dumbster / smtp / SmtpResponse.java
1 /*\r
2  * Dumbster: a dummy SMTP server.\r
3  * Copyright (C) 2003, Jason Paul Kitchen\r
4  * lilnottsman@yahoo.com\r
5  *\r
6  * This library is free software; you can redistribute it and/or\r
7  * modify it under the terms of the GNU Lesser General Public\r
8  * License as published by the Free Software Foundation; either\r
9  * version 2.1 of the License, or (at your option) any later version.\r
10  *\r
11  * This library is distributed in the hope that it will be useful,\r
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
14  * Lesser General Public License for more details.\r
15  *\r
16  * You should have received a copy of the GNU Lesser General Public\r
17  * License along with this library; if not, write to the Free Software\r
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
19  */\r
20 package com.dumbster.smtp;\r
21 \r
22 /**\r
23  * SMTP response container.\r
24  */\r
25 public class SmtpResponse {\r
26 \r
27         /** Response code - see RFC-2821. */\r
28         private int code;\r
29 \r
30         /** Response message. */\r
31         private String message;\r
32 \r
33         /** New state of the SMTP server once the request has been executed. */\r
34         private SmtpState nextState;\r
35 \r
36         /**\r
37          * Constructor.\r
38          * @param code response code\r
39          * @param message response message\r
40          * @param next next state of the SMTP server\r
41          */\r
42         public SmtpResponse(int code, String message, SmtpState next) {\r
43                 this.code = code;\r
44                 this.message = message;\r
45                 this.nextState = next;\r
46         }\r
47 \r
48         /**\r
49          * Get the response code.\r
50          * @return response code\r
51          */\r
52         public int getCode() {\r
53                 return code;\r
54         }\r
55 \r
56         /**\r
57          * Get the response message.\r
58          * @return response message\r
59          */\r
60         public String getMessage() {\r
61                 return message;\r
62         }\r
63 \r
64         /**\r
65          * Get the next SMTP server state.\r
66          * @return state\r
67          */\r
68         public SmtpState getNextState() {\r
69                 return nextState;\r
70         }\r
71 }