1 /**
2 * This file is part of Waarp Project.
3 *
4 * Copyright 2009, Frederic Bregier, and individual contributors by the @author tags. See the
5 * COPYRIGHT.txt in the distribution for a full listing of individual contributors.
6 *
7 * All Waarp Project is free software: you can redistribute it and/or modify it under the terms of
8 * the GNU General Public License as published by the Free Software Foundation, either version 3 of
9 * the License, or (at your option) any later version.
10 *
11 * Waarp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
12 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
13 * Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along with Waarp . If not, see
16 * <http://www.gnu.org/licenses/>.
17 */
18 package org.waarp.ftp.core.command.internal;
19
20 import org.waarp.common.command.ReplyCode;
21 import org.waarp.common.command.exception.CommandAbstractException;
22 import org.waarp.ftp.core.command.AbstractCommand;
23 import org.waarp.ftp.core.command.FtpCommandCode;
24 import org.waarp.ftp.core.session.FtpSession;
25
26 /**
27 * Connection command: initialize the process of authentication
28 *
29 * @author Frederic Bregier
30 *
31 */
32 public class ConnectionCommand extends AbstractCommand {
33
34 /**
35 * Create a ConnectionCommand
36 *
37 * @param session
38 */
39 public ConnectionCommand(FtpSession session) {
40 super();
41 setArgs(session, "Connection", null, FtpCommandCode.Connection);
42 }
43
44 @Override
45 public void exec() throws CommandAbstractException {
46 // Nothing to do except 220
47 getSession().setReplyCode(ReplyCode.REPLY_220_SERVICE_READY, null);
48 }
49
50 }