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)
Runtime
addCustomInitializer
in interface Runtime
customInitializer
- the additional initializerpublic void addInitializationCompleteListener(InitializationCompleteListener listener)
Runtime
addInitializationCompleteListener
in interface Runtime
listener
- the listener to addpublic void addInitializationCondition(String conditionId)
Runtime
addInitializationCondition
in interface Runtime
conditionId
- the ID of the conditionpublic void fulfillInitializationCondition(String conditionId)
Runtime
Runtime.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 Runtime
conditionId
- the ID of the condition to fulfill.public ApplicationInformation getApplicationInformation()
getApplicationInformation
in interface Runtime
public ConfigurationManager getConfigurationManager()
getConfigurationManager
in interface Runtime
public InitializationStatus getInitializationStatus()
getInitializationStatus
in interface Runtime
public CommunoteInstaller getInstaller()
getInstaller
in interface Runtime
public boolean isCoreInitialized()
isCoreInitialized
in interface Runtime
public boolean isInitialized()
isInitialized
in interface Runtime
Runtime.isCoreInitialized()
returns true and all conditions are fulfilled.public void start()
BootstrapException
will be
thrown.Copyright © 2019 Communote team. All rights reserved.