1
2
3
4
5
6
7
8
9
10
11
12
13 package org.abstracthorizon.mercury.smtp.command;
14
15 import java.io.IOException;
16
17 import org.abstracthorizon.mercury.common.command.CommandException;
18 import org.abstracthorizon.mercury.smtp.SMTPResponses;
19 import org.abstracthorizon.mercury.smtp.SMTPSession;
20 import org.abstracthorizon.mercury.smtp.exception.ParserException;
21
22
23
24
25
26
27 public class ResetCommand extends SMTPCommand {
28
29
30
31
32 public ResetCommand() {
33 }
34
35
36
37
38
39
40
41
42 protected void execute(SMTPSession connection) throws CommandException, IOException, ParserException {
43 connection.getScanner().check_eol();
44 resetSession(connection);
45 connection.sendResponse(SMTPResponses.OK_RESPONSE);
46 }
47
48
49
50
51
52 protected void resetSession(SMTPSession connection) {
53
54 connection.setState(SMTPSession.STATE_READY);
55
56 }
57
58 }