FailureHookManager class
@deprecated Use ArtifactPublisher.instance instead.
Backward-compatible singleton that delegates all operations to ArtifactPublisher.
When you call register with a FailureHook, it creates an internal ArtifactHook adapter and registers it with ArtifactPublisher.
Constructors
- FailureHookManager()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hooks
→ List<
ArtifactHook> -
The registered hooks (read-only).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void - Unregister all failure hooks (only those registered via this manager).
-
dispose(
) → void - Dispose the manager and clear all hooks.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
FailureHook hook) → void - Register a FailureHook.
-
toString(
) → String -
A string representation of this object.
inherited
-
trigger(
AppFailure failure, StackTrace stackTrace, {String? useCaseName, Map< String, dynamic> metadata = const {}, List<String> pathSegments = const []}) → Future<void> - Trigger hooks for a failure (awaited).
-
triggerFireAndForget(
AppFailure failure, StackTrace stackTrace, {String? useCaseName, Map< String, dynamic> metadata = const {}, List<String> pathSegments = const []}) → void - Fire-and-forget version of trigger.
-
unregister(
String id) → void -
Unregister a hook by
id.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited