Package com.iizix.server.app
Class AppDefinition
java.lang.Object
com.iizix.server.app.AppDefinition
Application definition when loading the applications/projects.
- Author:
- Christopher Mindus
- Field SummaryFields
- Constructor SummaryConstructorsConstructorDescription- AppDefinition- (String id, String serverEnvironmentName, File iiziAppFile, boolean doHotDeploy) Constructor.
- Method SummaryModifier and TypeMethodDescription- void- addModuleDirectory- (File dir) Adds a directory for loading.- void- dispose()Disposes of the application definition.- voidDisposes of the application's hot deploy.Get the web server file provider for the application session.Gets the application factory.Returns the Server environment for the application.- booleanChecks if the iiziApp has been changed and needs reload.- booleanChecks if hot deploy is used for this application.- void- loadApplication- (ServerShell server) Loads the application.- boolean- reload- (ServerShell server, boolean forceReload) Reloads the application if it has changed.
- Field Details- idThe ID of the application.
 
- Constructor Details- AppDefinitionpublic AppDefinition- (String id, String serverEnvironmentName, File iiziAppFile, boolean doHotDeploy) Constructor.- Parameters:
- id- The application ID.
- serverEnvironmentName- The server environment name to use, null for default.
- iiziAppFile- The application file.
- doHotDeploy- Hot deploy flag.
 
 
- Method Details- disposepublic void dispose()Disposes of the application definition.- This method is intended to be called from the server: DO NOT CALL THIS METHOD. 
- getFactoryGets the application factory.- Returns:
- The application factory once loaded, null otherwise.
 
- addModuleDirectoryAdds a directory for loading.- Parameters:
- dir- The Module directory to load.
- Throws:
- IOException- if the directory is already added, or if the application definition is a compiled application.
 
- hasAppChangedpublic boolean hasAppChanged()Checks if the iiziApp has been changed and needs reload.- Returns:
- true if app has changed and hot deploy is used, false when not changed or hot deploy is not used.
 
- getServerEnvironmentNameReturns the Server environment for the application.
- loadApplicationpublic void loadApplication- (ServerShell server) throws PropException, IOException, ServerApplicationSetupException Loads the application.- Throws:
- IOException- For file errors.
- PropException- For property errors.
- ServerApplicationSetupException- In case a plug-in fail to initialize.
 
- isHotDeployEnabledpublic boolean isHotDeployEnabled()Checks if hot deploy is used for this application.- Returns:
- true if hot deploy is enabled, false otherwise.
 
- reloadpublic boolean reload- (ServerShell server, boolean forceReload) throws PropException, IOException, ServerApplicationSetupException Reloads the application if it has changed.- Returns:
- true if reloaded, false if not changed or not loaded with hot deploy.
- Throws:
- IOException- For file errors.
- PropException- For property errors.
- ServerApplicationSetupException- In case a plug-in fail to initialize.
 
- disposeHotDeploypublic void disposeHotDeploy()Disposes of the application's hot deploy.
- getAppSessionFileProviderGet the web server file provider for the application session.- Returns:
- The web server file provider.
- Throws:
- IOException- If the directory for the application session files failed to be created.
- IllegalStateException- If the application is not yet loaded or is disposed of.