-
Notifications
You must be signed in to change notification settings - Fork 1
Quick start guide
Adrien Castex edited this page Apr 19, 2015
·
5 revisions
Even if the main purpose of the project is to create personal resource manager to fit the personal needs, there are resource managers already included in the project. This way, you can use them to test the server or to achieve your goal.
The class HTTPServerSettings allow you to configure the server. Every parameter is optional.
HTTPServerSettings settings = new HTTPServerSettings(
<server_name = "WebDav Server">,
<command_list = HTTPCommand.getStandardCommands()>,
<resource_manager_class = StandardResourceManager.class>,
<resource_root = "">,
<timeout = 5>,
<nb_request_max_by_tcp_connection = 100>
);- Optional : <
description=defaultValue>
HTTPServer server = new HTTPServer(
<port>,
<settings>,
<use_SSL = false>,
<scan_port_if_specified_is_not_available = false>
);- Optional : <
description=defaultValue> - Required : <
description>
Blocking call :
server.run(); // blocking callNon-blocking call :
new Thread(server).start(); // asynchronous callHTTPServerSettings settings = new HTTPServerSettings(
"WebDAV Server",
HTTPCommand.getStandardCommands(),
StandardResourceManager.class,
"<my folder>"
);
HTTPServer s = new HTTPServer(1700, settings);
s.run(); // Run the serverLocalCryptedResourceManager.loadCipherCrypter(ICrypter.Algorithm.AES_ECB_PKCS5Padding);
LocalCryptedResourceManager.setKey("<my password>");
HTTPServerSettings settings = new HTTPServerSettings(
"WebDAV Server",
HTTPCommand.getStandardCommands(),
LocalCryptedResourceManager.class,
"<my folder>"
);
HTTPServer s = new HTTPServer(1700, settings);
s.run(); // Run the server