SecureServiceRegistry class

A secure service registry for modules with audit logging

Inheritance

Constructors

SecureServiceRegistry()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
interactions List<ModuleInteraction>
no setter
registeredServices List<SecureServiceDescriptor>
Get all registered service descriptors (for debugging)
no setter
relationships Set<String>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDataListener(String key, VoidCallback callback) → void
Add listener for data changes
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clearAll() → void
Clear all registry state. PROTECTED: Only available in debug/test environments.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
getAvailableServices(String callerModuleId) List<SecureServiceDescriptor>
Get all available services for a caller
getData<T>(String key, {required String callerModuleId}) → T?
Get shared data with proper tracking
getDescriptor(String serviceName) SecureServiceDescriptor?
Get service descriptor
getModuleServices(String moduleId) List<SecureServiceDescriptor>
Get all services registered by a module
getSecureData<T>(String key, {required String callerModuleId}) → T?
Retrieves shared data, handling SecureData wrappers and automatic expiration.
getService<T>(String serviceName, {required String callerModuleId}) → T?
Get a service with proper access control
hasService(String serviceName) bool
Check if a service exists
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
recordInteraction(ModuleInteraction interaction) → void
registerService({required String name, required String ownerModuleId, required Function service, List<String> allowedCallers = const []}) → void
Register a service
removeDataListener(String key, VoidCallback callback) → void
Remove listener
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setData(String key, dynamic value, {required String callerModuleId}) → void
Set shared data (legacy compatibility)
setSecureData<T>(String key, T value, {required String callerModuleId, bool encrypt = false, Duration? ttl}) → void
Sets shared data with optional encryption and Time-to-Live (TTL).
toString() String
A string representation of this object.
inherited
unregisterModuleServices(String moduleId) → void
Unregister all services from a module
unregisterService(String serviceName, {required String callerModuleId}) → void
Unregister a service

Operators

operator ==(Object other) bool
The equality operator.
inherited