Package com.iizix.jetty
Class RunConfigurationWebServer
java.lang.Object
com.iizix.jetty.RunConfigurationWebServer
- All Implemented Interfaces:
- IWebServerCompression
Web server that is used when Run Configuration is used, an optimized Jetty Server for "raw Jetty" web socket communication that is used to run one IIZI Module Project (that may refer to others, including Java projects).
- Author:
- Christopher Mindus
- Field SummaryFields
- Constructor SummaryConstructorsConstructorDescription- RunConfigurationWebServer- (String root, IWSFileProviderServer fileProvider, IWSUploaderService uploaderService) Constructor.
- Method SummaryModifier and TypeMethodDescription- void- addFileRedirection- (File originalFile, File compressedfile) Puts a compressed file name into the resource cache of the web server.- void- addFileRedirection- (String name, File file) Puts a compressed file name into the resource cache of the web server.Returns all the port configurations used for each request.Gets the web server statistics as a HTML string.- getWebServerMapping- (String mappedFile) Gets the map of web server mappings for files.- startWebServer- (IExternalBrowserPages extPages, WebSocketAcceptor acceptor, IServerSettings settings, Callable<Void> redirCallback, ICommonServletInterface... servlets) Starts the web server.
- Field Details- sss
- serverThe Jetty Server instance.
 
- Constructor Details- RunConfigurationWebServerpublic RunConfigurationWebServer- (String root, IWSFileProviderServer fileProvider, IWSUploaderService uploaderService) Constructor.- Parameters:
- root- The web server root.
- fileProvider- The external file provider, null for none.
 
 
- Method Details- getPortConfigurationsReturns all the port configurations used for each request.- Please note that this call will return - nullif the server never has been not started.- Returns:
- All the port configurations used by the server, or nullif the server never has been started.
 
- getWebServerMappingGets the map of web server mappings for files.- Parameters:
- mappedFile- The file to map.
- Returns:
- The mapping from String (such as "dojo.root" or "iiziRunDevel.root") to File Returns null if not found.
 
- startWebServerpublic PortConfig[] startWebServer- (IExternalBrowserPages extPages, WebSocketAcceptor acceptor, IServerSettings settings, Callable<Void> redirCallback, ICommonServletInterface... servlets) throws IOException Starts the web server.- Parameters:
- extPages- External pages implementor, null for none.
- acceptor- The acceptor for engine requests.
- settings- The settings.
- redirCallback- Callback when redirections are ready.
- servlets- Servlets interface(s).
- Returns:
- The port configuration array.
- Throws:
- IOException- For errors.
 
- addFileRedirectionPuts a compressed file name into the resource cache of the web server.- Specified by:
- addFileRedirectionin interface- IWebServerCompression
- Parameters:
- name- The file name, typically "iizi*-build.css" or "iizi*-build.js".
- file- The compressed CSS or JS file.
 
- addFileRedirectionPuts a compressed file name into the resource cache of the web server.- Specified by:
- addFileRedirectionin interface- IWebServerCompression
- Parameters:
- originalFile- The original uncompressed file.
- compressedfile- The compressed CSS or JS file.
 
- getStatisticsGets the web server statistics as a HTML string.- Returns:
- The web server statistics formatted as "[h1]Statistics:[/h1]...[h2]...[/h2]...", i.e. no body, no div's. If web server is not started, "[h1]Web server is not started[/h1]" is returned, and if the web server is stopped but has previously been running, "[h1]Web server is stopped[/h1]" is appended to the previous statistics.