Package com.github.toolarium.jwebserver
Class JWebServer
java.lang.Object
com.github.toolarium.jwebserver.JWebServer
- All Implemented Interfaces:
Runnable
The jwebserver.
https://blogs.oracle.com/javamagazine/post/java-18-simple-web-server
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the configurationbooleanhasError()Check if there are any errorsbooleanCheck if the server is runningstatic voidThe main classvoidrun()voidsetConfiguration(IWebServerConfiguration webServerConfiguration) Get the configurationvoidstart()Stop the servervoidstop()Stop the server
-
Constructor Details
-
JWebServer
public JWebServer()Constructor for JWebServer
-
-
Method Details
-
getConfiguration
Get the configuration- Returns:
- the configuration
-
setConfiguration
Get the configuration- Parameters:
webServerConfiguration- the web server configuration
-
main
The main class- Parameters:
args- the arguments
-
start
public void start()Stop the server -
stop
public void stop()Stop the server -
isRunning
public boolean isRunning()Check if the server is running- Returns:
- true if it is running
-
hasError
public boolean hasError()Check if there are any errors- Returns:
- true if there are any errors
-
run
public void run()
-