1
2
3
4
5
6
7
8
9
10
11
12
13 package org.abstracthorizon.mercury.imap.cmd;
14
15 import java.io.IOException;
16 import org.abstracthorizon.mercury.common.command.CommandException;
17 import org.abstracthorizon.mercury.imap.IMAPSession;
18 import org.abstracthorizon.mercury.imap.response.ByeResponse;
19 import org.abstracthorizon.mercury.imap.util.ParserException;
20
21
22
23
24
25
26 public class Logout extends IMAPCommand {
27
28
29
30
31
32 public Logout(String mnemonic) {
33 super(mnemonic);
34 }
35
36
37
38
39
40
41
42
43
44 protected void execute(IMAPSession session) throws CommandException, ParserException, IOException {
45 checkEOL(session);
46
47 new ByeResponse(session).submit();
48 try {
49 sendOK(session);
50 } catch (IOException e) {
51
52 }
53 session.close();
54 }
55 }