提交 9d25cae7 authored 作者: Thomas Mueller's avatar Thomas Mueller

Moving the FTP server to the tools section.

上级 d35e6d87
...@@ -20,7 +20,6 @@ import java.util.Locale; ...@@ -20,7 +20,6 @@ import java.util.Locale;
import java.util.Properties; import java.util.Properties;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.engine.Constants;
import org.h2.server.Service; import org.h2.server.Service;
import org.h2.store.fs.FileSystem; import org.h2.store.fs.FileSystem;
import org.h2.util.FileUtils; import org.h2.util.FileUtils;
...@@ -37,30 +36,40 @@ import org.h2.util.Tool; ...@@ -37,30 +36,40 @@ import org.h2.util.Tool;
*/ */
public class FtpServer implements Service { public class FtpServer implements Service {
/**
* The default port to use for the FTP server.
* This value is also in the documentation and in the Server javadoc.
*/
public static final int DEFAULT_PORT = 8021;
/** /**
* The default root directory name used by the FTP server. * The default root directory name used by the FTP server.
* This value is also in the documentation and in the Server javadoc.
*/ */
public static final String DEFAULT_ROOT = "ftp"; public static final String DEFAULT_ROOT = "ftp";
/** /**
* The default user name that is allowed to read data. * The default user name that is allowed to read data.
* This value is also in the documentation and in the Server javadoc.
*/ */
public static final String DEFAULT_READ = "guest"; public static final String DEFAULT_READ = "guest";
/** /**
* The default user name that is allowed to read and write data. * The default user name that is allowed to read and write data.
* This value is also in the documentation and in the Server javadoc.
*/ */
public static final String DEFAULT_WRITE = "sa"; public static final String DEFAULT_WRITE = "sa";
/** /**
* The default password of the user that is allowed to read and write data. * The default password of the user that is allowed to read and write data.
* This value is also in the documentation and in the Server javadoc.
*/ */
public static final String DEFAULT_WRITE_PASSWORD = "sa"; public static final String DEFAULT_WRITE_PASSWORD = "sa";
static final String TASK_SUFFIX = ".task"; static final String TASK_SUFFIX = ".task";
private ServerSocket serverSocket; private ServerSocket serverSocket;
private int port = Constants.DEFAULT_FTP_PORT; private int port = DEFAULT_PORT;
private int openConnectionCount; private int openConnectionCount;
private int maxConnectionCount = 100; private int maxConnectionCount = 100;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论