RsetCmdHandlerpublic class RsetCmdHandler extends Object implements CommandHandler
Fields Summary |
---|
private static final String | COMMAND_NAMEThe name of the command handled by the command handler |
Methods Summary |
---|
private void | doRSET(SMTPSession session, java.lang.String argument)Handler method called upon receipt of a RSET command.
Resets message-specific, but not authenticated user, state.
String responseString = "";
if ((argument == null) || (argument.length() == 0)) {
// remember the ehlo mode
Object currentHeloMode = session.getState().get(SMTPSession.CURRENT_HELO_MODE);
session.resetState();
// start again with the old helo mode
if (currentHeloMode != null) {
session.getState().put(SMTPSession.CURRENT_HELO_MODE,currentHeloMode);
}
responseString = "250 "+DSNStatus.getStatus(DSNStatus.SUCCESS,DSNStatus.UNDEFINED_STATUS)+" OK";
} else {
responseString = "500 "+DSNStatus.getStatus(DSNStatus.PERMANENT,DSNStatus.DELIVERY_INVALID_ARG)+" Unexpected argument provided with RSET command";
}
session.writeResponse(responseString);
| public void | onCommand(SMTPSession session)
/*
* handles RSET command
*
* @see org.apache.james.smtpserver.CommandHandler#onCommand(SMTPSession)
**/
doRSET(session, session.getCommandArgument());
|
|