class
Movie::ExtensionRegistry
- Movie::ExtensionRegistry
- Reference
- Object
Overview
Registry for managing extensions within an ActorSystem.
Defined in:
movie.crConstructors
Instance Method Summary
-
#all : Array(Extension)
Returns all registered extensions.
-
#get(type : T.class) : T | Nil forall T
Returns an extension by type, or nil if not registered.
-
#get!(type : T.class) : T forall T
Returns an extension by type, raising if not found.
-
#get_or_register(type : T.class, &factory : -> Extension) : T forall T
Creates, starts, and registers an extension once.
-
#get_or_register(type : T.class, extension : Extension) : T forall T
Compatibility overload for callers that already constructed an instance.
-
#register(extension : Extension)
Registers an extension instance.
-
#registered?(type : T.class) : Bool forall T
Returns true if an extension of the given type is registered.
-
#stop_all
Stops all registered extensions.
Constructor Detail
Instance Method Detail
Returns an extension by type, or nil if not registered.
Returns an extension by type, raising if not found.
Creates, starts, and registers an extension once. Concurrent callers wait for startup to finish and never observe a partially started instance.
Compatibility overload for callers that already constructed an instance.
Registers an extension instance. The extension's class name is used as the key.
Returns true if an extension of the given type is registered.