1 /*
2 * Copyright (c) 2004-2007 Creative Sphere Limited.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 *
10 * Creative Sphere - initial API and implementation
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 * NOOP command
24 *
25 * @author Daniel Sendula
26 */
27 public class NoopCommand extends SMTPCommand {
28
29 /**
30 * Constructor
31 */
32 public NoopCommand() {
33 }
34
35 /**
36 * Executed the command
37 * @param connection smtp session
38 * @throws CommandException
39 * @throws IOException
40 * @throws ParserException
41 */
42 protected void execute(SMTPSession connection) throws CommandException, IOException, ParserException {
43 connection.getScanner().skip_line();
44 connection.sendResponse(SMTPResponses.OK_RESPONSE);
45 }
46
47 }