2 * Dumbster: a dummy SMTP server.
\r
3 * Copyright (C) 2003, Jason Paul Kitchen
\r
4 * lilnottsman@yahoo.com
\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
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
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
20 package com.dumbster.smtp;
\r
23 * SMTP response container.
\r
25 public class SmtpResponse {
\r
27 /** Response code - see RFC-2821. */
\r
30 /** Response message. */
\r
31 private String message;
\r
33 /** New state of the SMTP server once the request has been executed. */
\r
34 private SmtpState nextState;
\r
38 * @param code response code
\r
39 * @param message response message
\r
40 * @param next next state of the SMTP server
\r
42 public SmtpResponse(int code, String message, SmtpState next) {
\r
44 this.message = message;
\r
45 this.nextState = next;
\r
49 * Get the response code.
\r
50 * @return response code
\r
52 public int getCode() {
\r
57 * Get the response message.
\r
58 * @return response message
\r
60 public String getMessage() {
\r
65 * Get the next SMTP server state.
\r
68 public SmtpState getNextState() {
\r