java.lang.Object
org.cryptomator.frontend.webdav.WebDavServer

public class WebDavServer extends Object
The WebDAV server, that WebDAV servlets can be added to using createWebDavServlet(Path, String). An instance of this class can be obtained via create(InetSocketAddress).
  • Method Details

    • create

      public static WebDavServer create(InetSocketAddress bindAddr)
    • start

      public void start() throws ServerLifecycleException
      Starts the WebDAV server.
      Throws:
      ServerLifecycleException - If any exception occurs during server start (e.g. port not available).
    • stop

      public void stop() throws ServerLifecycleException
      Stops the WebDAV server.
      Throws:
      ServerLifecycleException - If the server could not be stopped for any unexpected reason.
    • terminate

      public void terminate() throws ServerLifecycleException
      Stops the WebDAV server and shuts down its executor service. After terminating, this instance can no longer be restarted.
      Throws:
      ServerLifecycleException - If the server could not be stopped for any unexpected reason.
    • createWebDavServlet

      public WebDavServletController createWebDavServlet(Path rootPath, String contextPath)
      Creates a new WebDAV servlet (without starting it yet).
      Parameters:
      rootPath - The path to the directory which should be served as root resource.
      contextPath - The servlet context path, i.e. the path of the root resource.
      Returns:
      The controller object for this new servlet