Package com.iizix.server.devel
Class ExternalBrowserPagesImpl
java.lang.Object
com.iizix.server.devel.ExternalBrowserPagesImpl
- All Implemented Interfaces:
- IExternalBrowserPages
Class to handle external web pages with embedded Jetty.
- Author:
- Christopher Mindus
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- boolean- doAuthenticate- (String target) Checks if a request URL is a WebSocket request or an Application URI that should not use authentication.- getCustomizedAppHTML- (File file, String appID, String lang) Gets a customized "iiziApp.html" file for a specific application ID and optional language.- getFileOrResource- (String location, String target) Gets a File or Resource redirection from a web server target request, used for e.g.- boolean- isTargetValid- (String target) Checks for valid target to handle.- void- print- (PrintWriter pw, String root, String target, int port, boolean isSecure, HttpServletRequest request, HttpServletResponse response) Print the page output.- boolean- registerRequestPrinter- (String target, IWebServerRequestPrinter processor) Registers a new request printer.- boolean- unregisterRequestPrinter- (String target, IWebServerRequestPrinter processor) Unregister a previously registered request printer.
- Constructor Details- ExternalBrowserPagesImplConstructor.
 
- Method Details- doAuthenticateChecks if a request URL is a WebSocket request or an Application URI that should not use authentication.- Specified by:
- doAuthenticatein interface- IExternalBrowserPages
- Parameters:
- target- The target URI.
- Returns:
- true if authentication should be performed, false otherwise.
 
- getFileOrResourceGets a File or Resource redirection from a web server target request, used for e.g. Asset resource files when used on the server and the file is inside a Jar.- Specified by:
- getFileOrResourcein interface- IExternalBrowserPages
- Parameters:
- location- The location string between '/$' and '$/'
- target- The target string from the Web Server after last '$/' (i.e. after location), does NOT begin with '/'.
- Returns:
- The Fileor instance ofResourcefor the resource, null for none.
 
- registerRequestPrinterRegisters a new request printer.- Parameters:
- target- The target URL, always starting with "/" and doesn't contain the query.
- processor- The print processor.
- Returns:
- true if added successfully, false if the print processor already exists.
 
- unregisterRequestPrinterUnregister a previously registered request printer.- Parameters:
- target- The target URL, always starting with "/" and doesn't contain the query.
- processor- The print processor.
- Returns:
- true if removed successfully, false if the print processor does not exist or doesn't match.
 
- isTargetValidChecks for valid target to handle.- Specified by:
- isTargetValidin interface- IExternalBrowserPages
 
- printpublic void print- (PrintWriter pw, String root, String target, int port, boolean isSecure, HttpServletRequest request, HttpServletResponse response) throws IOException Print the page output.- Specified by:
- printin interface- IExternalBrowserPages
- Parameters:
- pw- The print writer.
- root- The web server root.
- target- Target page.
- port- The port number (external value could be different).
- isSecure- Flag indicating the connection is secure due to external party.
- request- The request.
- response- The response.
- Throws:
- IOException- For I/O errors.
 
- getCustomizedAppHTMLGets a customized "iiziApp.html" file for a specific application ID and optional language.- Specified by:
- getCustomizedAppHTMLin interface- IExternalBrowserPages
- Parameters:
- file- The compressed iiziApp.html file without customization.
- appID- The application ID.
- lang- The language requested, or- nullfor default.
- Returns:
- The customized (and probably cached) file to send instead of the un-customized one, or nullfor none, i.e. in case an application ID is not found.