Class HTTPSServer
java.lang.Object
org.languagetool.server.Server
org.languagetool.server.HTTPSServer
A small embedded HTTPS server that checks text. Works only with https, not with http.
- Since:
- 2.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Server
Server.StoppingThreadPoolExecutor -
Field Summary
FieldsFields inherited from class Server
DEFAULT_ALLOWED_IPS, host, httpHandler, port, server -
Constructor Summary
ConstructorsConstructorDescriptionHTTPSServer(HTTPSServerConfig config, boolean runInternally, String host, Set<String> allowedIps) Prepare a server on the given host and port - use run() to start it. -
Method Summary
Modifier and TypeMethodDescriptionprivate com.sun.net.httpserver.HttpsConfiguratorgetConfigurator(SSLContext sslContext) protected Stringprivate SSLContextgetSslContext(File keyStoreFile, String passPhrase) static voidvoidstop()Stop the server.Methods inherited from class Server
checkForNonRootUser, getErrorRequestLimiterOrNull, getExecutorService, getRequestLimiterOrNull, isRunning, printCommonConfigFileOptions, printCommonOptions, run, usageRequested
-
Field Details
-
executorService
-
-
Constructor Details
-
HTTPSServer
public HTTPSServer(HTTPSServerConfig config, boolean runInternally, String host, Set<String> allowedIps) Prepare a server on the given host and port - use run() to start it.- Parameters:
runInternally- if true, then the server was started from the GUI.host- the host to bind to, e.g."localhost"ornullto bind to any hostallowedIps- the IP addresses from which connections are allowed ornullto allow any host- Throws:
PortBindingException- if we cannot bind to the given port, e.g. because something else is running there
-
-
Method Details
-
getSslContext
-
getConfigurator
-
stop
-
main
-
getProtocol
- Specified by:
getProtocolin classServer
-