Domain binds Kanzi subsystems and objects together. More...
Classes | |
interface | PluginHandler |
Plugin handler implements the functionality for loading a plugin from the associated plugin file. More... | |
Public Member Functions | |
ColorWorkflow | getColorWorkflow () |
Gets the currently configured color workflow. More... | |
MainLoopScheduler | getMainLoopScheduler () |
Returns the main loop scheduler that controls tasks and timers. More... | |
MetaclassRegistry | getMetaclassRegistry () |
Returns the metaclass registry that contains all available metadata in the domain. More... | |
long | getNative () |
Gets a pointer to the backing C++ instance. More... | |
Object | getPlatformContext () |
Returns the platform-specific context set by the active platform backend. More... | |
ResourceManager | getResourceManager () |
Returns the resource manager that contains all registered resources in the domain. More... | |
TaskDispatcher | getTaskDispatcher () |
Returns the task dispatcher of this domain. More... | |
void | loadKzb (String fileName) throws FileNotFoundException |
Loads a kzb file from the file system, if the file is not already loaded. More... | |
void | registerPlugin (Plugin plugin) |
Registers a plugin and the metadata it contains. More... | |
void | registerPluginHandler (String protocol, PluginHandler handler) |
Registers a plugin handler for a given protocol. More... | |
void | unregisterPluginHandler (String protocol) |
Unregisters existing plugin handler for a given protocol. More... | |
Domain binds Kanzi subsystems and objects together.
All objects and subsystems in Kanzi are associated with a domain when created. Objects in the same domain share access to the same subsystems. Objects from different domains cannot be used together.
ColorWorkflow getColorWorkflow | ( | ) |
Gets the currently configured color workflow.
MainLoopScheduler getMainLoopScheduler | ( | ) |
Returns the main loop scheduler that controls tasks and timers.
MetaclassRegistry getMetaclassRegistry | ( | ) |
Returns the metaclass registry that contains all available metadata in the domain.
long getNative | ( | ) |
Gets a pointer to the backing C++ instance.
Object getPlatformContext | ( | ) |
Returns the platform-specific context set by the active platform backend.
On Android, this points to Android application context android.content.Context. On all other platforms, this is currently null.
ResourceManager getResourceManager | ( | ) |
Returns the resource manager that contains all registered resources in the domain.
TaskDispatcher getTaskDispatcher | ( | ) |
Returns the task dispatcher of this domain.
You can use the task dispatcher returned by this function to dispatch tasks that the system executes on the thread of this domain.
void loadKzb | ( | String | fileName | ) | throws FileNotFoundException |
Loads a kzb file from the file system, if the file is not already loaded.
You can also pass a cfg file that contains a list of kzb files that you want to load.
To load additional kzb files with the same name, use ResourceManager#addKzbFile(String).
fileName | The name of the kzb file or cfg file that contains a list of kzb files to load. |
InvalidKzbFileException | Throws an InvalidKzbFileException when the kzb file is invalid. |
FileNotFoundException | Throws a FileNotFoundException when the kzb file is not found. |
void registerPlugin | ( | Plugin | plugin | ) |
Registers a plugin and the metadata it contains.
plugin | Plugin to be registered. |
void registerPluginHandler | ( | String | protocol, |
PluginHandler | handler | ||
) |
Registers a plugin handler for a given protocol.
protocol | The format of the plugin file identified by its extension serves as a protocol. For example "dll" for windows shared libraries. |
handler | A plugin handler that implements functionality for loading a plugin from the associated plugin file. |
void unregisterPluginHandler | ( | String | protocol | ) |
Unregisters existing plugin handler for a given protocol.
protocol | The format of the plugin file identified by its extension serves as a protocol. For example "dll" for windows shared libraries. |