Kanzi Framework  3.9.0
Java API
Domain Class Reference

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

MetaclassRegistry getMetaclassRegistry ()
 Returns the metaclass registry that contains all available metadata in the domain. 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...
 
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...
 

Detailed Description

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.

Member Function Documentation

◆ getMetaclassRegistry()

MetaclassRegistry getMetaclassRegistry ( )

Returns the metaclass registry that contains all available metadata in the domain.

Returns
Instance of the metaclass registry.

◆ getPlatformContext()

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.

Returns
Type-erased reference to platform-specific context.

◆ getResourceManager()

ResourceManager getResourceManager ( )

Returns the resource manager that contains all registered resources in the domain.

Returns
Instance of the resource manager.

◆ registerPlugin()

void registerPlugin ( Plugin  plugin)

Registers a plugin and the metadata it contains.

Parameters
pluginPlugin to be registered.

◆ registerPluginHandler()

void registerPluginHandler ( String  protocol,
PluginHandler  handler 
)

Registers a plugin handler for a given protocol.

Parameters
protocolThe format of the plugin file identified by its extension serves as a protocol. For example "dll" for windows shared libraries.
handlerA plugin handler that implements functionality for loading a plugin from the associated plugin file.

◆ unregisterPluginHandler()

void unregisterPluginHandler ( String  protocol)

Unregisters existing plugin handler for a given protocol.

Parameters
protocolThe format of the plugin file identified by its extension serves as a protocol. For example "dll" for windows shared libraries.