aiGatewayRegistry
Returns the singleton GatewayRegistry — the extension point external gateway modules use to make their gateway resolvable by aiGateway().
Returns the singleton GatewayRegistry — the extension point external gateway modules use to make their gateway resolvable by aiGateway().
Syntax
aiGatewayRegistry()Parameters
No parameters.
Returns
The singleton GatewayRegistry instance. The same instance is returned on every call within a runtime.
Methods
register( gateway, module )
GatewayRegistry
Register a gateway; module namespaces the key
unregister( key )
GatewayRegistry
Remove one gateway by key
unregisterByModule( module )
GatewayRegistry
Remove every gateway a module registered
has( key )
boolean
Whether a key is registered
get( key )
IGateway
Fetch a registered gateway
listGateways()
struct
Every registered gateway, keyed
Keys follow the name or name@module convention, so two modules can each provide a gateway of the same name without colliding.
Throws
InvalidArgument if the registered object is not an IGateway.
Examples
Registering From a Module
Once registered, the gateway resolves by name:
Inspecting the Registry
Events
onGatewayRegistryRegister
gateway, key, module
onGatewayRegistryUnregister
key, module
Related
Last updated