Package com.iizix.server
Class JettyRunConfiguration
java.lang.Object
com.iizix.server.ServerShell
com.iizix.server.JettyRunConfiguration
- All Implemented Interfaces:
- IWebServiceEngine,- WebSocketAcceptor,- IAdditonalInformation<UserInfoHistoryEntry>,- IAppLoader,- IServer,- IKStringInfoProviderHolder
- Direct Known Subclasses:
- RuntimeBuilderServer,- StandardServer
Server using Jetty to serve a Run Configuration launch of an application from Eclipse. It is assumed that the application is an IIZI Module project that may refer to others, including Java projects.
The classpath is set-up from Eclipse when the JRE launches the main(args) static method. This code and other IIZI parts are set in the classpath from either Jar files if using a "distribution environment", or the directories hard-coded if using an "IIZI development environment".
- Author:
- Christopher Mindus
- Nested Class Summary- Nested classes/interfaces inherited from interface com.iizix.server.IServer- IServer.InvalidAppID, IServer.State
- Field Summary- Fields inherited from class com.iizix.server.ServerShell- externalBrowserPages, memoryJarFactory, xjarFactory- Fields inherited from interface com.iizix.server.IServer- MAX_VALID_APP_ID_LENGTH
- Constructor SummaryConstructorsConstructorDescription- JettyRunConfiguration- (File configFile, String extServerURL, String root, boolean useHotDeploy, AppDefinition[] apps, Map<String, - String> appAliases) Constructor.
- Method SummaryModifier and TypeMethodDescription- protected static String- addSyntax- (boolean isDevelServer, StringBuilder sb) Fills in the syntax.- void- configureProxy- (HttpURLConnection urlConnection) Configures a Http(s)URLConnection for proxy information.- booleanFlag indicating the normal HTML files needs compression along with CSS minify and JS compression.Gets a proxy to use for an URL.Gets the web server root directory.Gets the web server compression interface.- getWebServerMapping- (String mappedFile) Gets the map of web server mappings for files.- final voidCalled to load the applications.- static voidEntry point for development server start.- protected static void- main- (String[] args, boolean isDevelServer, Class<? extends JettyRunConfiguration> serverClass) Entry point for server start.- protected voidDisposes of the server.- voidCalled to initialize the server.- final booleanChecks if hot deploy is used for app reloads.- Methods inherited from class com.iizix.server.ServerShell- _getState, _registerApplication, _unregisterApplication, addDisposeListener, addEndPointListener, addFileUploader, addModule, addUserLoginProhibitedInterval, configureSessionMgr, dispose, flushStartupLog, getAccessibleEnvironments, getActiveUserSessions, getAdditionalInformation, getAppAliases, getApplication, getApplications, getCurrentDirectory, getDefaultMailSender, getEmailVerificationURL, getEndPointsInstances, getETag, getExecutorService, getExternalWebServerBaseURL, getFileProviderEngine, getHandledContextPaths, getHistory, getInfoClass, getInstance, getInstance, getKStringInfoProvider, getMailSender, getPropertyFactory, getPropertyManager, getServerConfigFile, getServerLogger, getServerProperties, getServerSettings, getServerThreadGroup, getSourceResolver, getStartTime, getState, getTXPCoordinator, getUserLoginProhibitedIntervals, getWebLogos, getWebThumbs, getWorker, getWSUploaderService, initializeCompressedFiles, initializeURNFactory, isRequestURIAccepted, isUserLoginEnabled, isUserLoginPermittedNow, loadFile, loadFile, loadPlugins, loadPluginsAndConfig, loadServerConfig, onApplicationSessionStarted, onApplicationSessionStopped, onDisposed, onEndPointDisposed, registerApplication, registerApplication, registerEndPointConstructor, registerRegionLocationServiceProviders, registerRequestPrinter, removeDisposeListener, removeEndPointListener, removeFileUploader, removeModule, saveFile, saveServerConfig, setUserLoginEnabled, setWSFileProviderEngine, shutdownRegionLocationServiceProviders, startServer, unregisterApplication, unregisterEndPointConstructor, unregisterRequestPrinter, updateWebServerRoot
- Constructor Details- JettyRunConfigurationpublic JettyRunConfiguration- (File configFile, String extServerURL, String root, boolean useHotDeploy, AppDefinition[] apps, Map<String, - String> appAliases) throws IOException, PropExceptionConstructor.- Parameters:
- configFile- The configuration file, null for default.
- extServerURL- The external server URL, null for default.
- root- The Web Server root, null for default.
- useHotDeploy- If hot deploy should be used or not.
- apps- The apps loaded.
- appAliases- App aliases table.
- Throws:
- IOException- For load failure.
- PropException- For property errors.
 
 
- Method Details- mainEntry point for development server start.
- mainprotected static void main- (String[] args, boolean isDevelServer, Class<? extends JettyRunConfiguration> serverClass) Entry point for server start.
- addSyntaxFills in the syntax.- Parameters:
- isDevelServer- Flag for development server.
- sb- The empty or prefilled StringBuilder.
- Returns:
- The String.
 
- onStartServerCalled to initialize the server.- Specified by:
- onStartServerin interface- IServer
- Overrides:
- onStartServerin class- ServerShell
- Throws:
- Throwable- for start-up errors.
 
- getRootDirectoryGets the web server root directory.- Returns:
- The directory, or null if web server is not started.
 
- useHotDeploypublic final boolean useHotDeploy()Checks if hot deploy is used for app reloads.- Returns:
- The hot deploy enablement flag.
 
- loadApplicationsCalled to load the applications. Apps are taken from command line, but this method will also load the ones from the database.- Specified by:
- loadApplicationsin interface- IServer
- Specified by:
- loadApplicationsin class- ServerShell
- Throws:
- Throwable- for start-up errors.
 
- onDisposeprotected void onDispose()Disposes of the server.- Overrides:
- onDisposein class- ServerShell
 
- getWebServerMappingGets the map of web server mappings for files.- Overrides:
- getWebServerMappingin class- ServerShell
- Parameters:
- mappedFile- The file to map.
- Returns:
- The mapping from String (such as "dojo.root" or "iiziRun.root") to File Returns null if not found.
 
- getWebServerCompressionGets the web server compression interface.- Specified by:
- getWebServerCompressionin class- ServerShell
- Returns:
- The instance of the interface implemented by the web server.
 
- doCompressNormalHTMLpublic boolean doCompressNormalHTML()Flag indicating the normal HTML files needs compression along with CSS minify and JS compression.- The files are typically: iiziApp.html and iiziVSViewer.html. - Specified by:
- doCompressNormalHTMLin class- ServerShell
- Returns:
- true by default, override to return false (e.g. for internal development).
 
- getProxyGets a proxy to use for an URL.- Parameters:
- url- The URL.
- Returns:
- The Proxy to use.
 
- configureProxyConfigures a Http(s)URLConnection for proxy information.- Parameters:
- urlConnection- The HttpURLConnection or HttpsURLConnection.