public class DefaultRuntime extends Object implements Runtime
| Constructor and Description |
|---|
DefaultRuntime(ApplicationInformation information,
ConfigurationManager configManager,
ApplicationInitializer initializer,
InstallationPreparedCallback callback) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomInitializer(CustomInitializer customInitializer)
Add an initializer to do custom initializations during startup.
|
void |
addInitializationCompleteListener(InitializationCompleteListener listener)
Add a listener that is informed after the application was completely initialized.
|
void |
addInitializationCondition(String conditionId)
Add a condition which needs to be fulfilled before the application is considered as
completely initialized.
|
void |
fulfillInitializationCondition(String conditionId)
Mark a condition that was previously added with
Runtime.addInitializationCondition(String)
as fulfilled. |
ApplicationInformation |
getApplicationInformation() |
ConfigurationManager |
getConfigurationManager() |
InitializationStatus |
getInitializationStatus() |
CommunoteInstaller |
getInstaller() |
boolean |
isCoreInitialized() |
boolean |
isInitialized() |
void |
start()
Starts the bootstrapping.
|
void |
stop()
Stop the runtime and free any resources held.
|
public DefaultRuntime(ApplicationInformation information, ConfigurationManager configManager, ApplicationInitializer initializer, InstallationPreparedCallback callback)
public void addCustomInitializer(CustomInitializer customInitializer)
RuntimeaddCustomInitializer in interface RuntimecustomInitializer - the additional initializerpublic void addInitializationCompleteListener(InitializationCompleteListener listener)
RuntimeaddInitializationCompleteListener in interface Runtimelistener - the listener to addpublic void addInitializationCondition(String conditionId)
RuntimeaddInitializationCondition in interface RuntimeconditionId - the ID of the conditionpublic void fulfillInitializationCondition(String conditionId)
RuntimeRuntime.addInitializationCondition(String)
as fulfilled. If this was the last unfulfilled init condition and the core is already
initialized the application will be considered as completely initialized and the
initialization complete listeners will be called. If the provided condition was not added the
call is ignored.fulfillInitializationCondition in interface RuntimeconditionId - the ID of the condition to fulfill.public ApplicationInformation getApplicationInformation()
getApplicationInformation in interface Runtimepublic ConfigurationManager getConfigurationManager()
getConfigurationManager in interface Runtimepublic InitializationStatus getInitializationStatus()
getInitializationStatus in interface Runtimepublic CommunoteInstaller getInstaller()
getInstaller in interface Runtimepublic boolean isCoreInitialized()
isCoreInitialized in interface Runtimepublic boolean isInitialized()
isInitialized in interface RuntimeRuntime.isCoreInitialized() returns true and all conditions are fulfilled.public void start()
BootstrapException will be
thrown.Copyright © 2019 Communote team. All rights reserved.