protected abstract Response imprtProgress(String uri, WLoginResult login);
+ protected abstract Response delete(String uri, WLoginResult login)
+ throws IOException;
+
+ /**
+ * Wait until all operations are done and stop the server.
+ * <p>
+ * All the new R/W operations will be refused after a call to stop.
+ */
+ protected abstract Response stop(WLoginResult login);
+
public WebLibraryServerHtml(boolean secure) throws IOException {
Integer port = Instance.getInstance().getConfig()
.getInteger(Config.SERVER_PORT);
} else {
rep = imprtProgress(uri, login);
}
+ } else if (WebLibraryUrls.isDeleteUrl(uri)) {
+ rep = delete(uri, login);
+ } else if (WebLibraryUrls.EXIT_URL.equals(uri)) {
+ rep = WebLibraryServerHtml.this.stop(login);
} else {
getTraceHandler().error(
"Supported URL was not processed: "
}
};
- if (ssf != null)
-
- {
+ if (ssf != null) {
getTraceHandler().trace("Install SSL on the web server...");
server.makeSecure(ssf, null);
getTraceHandler().trace("Done.");
}
}
+ protected void doStop() {
+ server.stop();
+ }
+
/**
* The traces handler for this {@link WebLibraryServerHtml}.
*