Interface ExtensionsImpl
- All Superinterfaces:
Extensions
INTERNAL API
Actor system extensions registry
-
Method Summary
Modifier and TypeMethodDescription<T extends Extension>
TcreateExtensionInstance(ExtensionId<T> ext) <T extends Extension>
Textension(ExtensionId<T> ext) Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered.<T extends Extension>
TfindExtension(ExtensionId<T> ext) Returns any extension registered to the specified Extension or returns null if not registeredbooleanhasExtension(ExtensionId<? extends Extension> ext) Returns whether the specified extension is already registered, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of executionscala.util.Try<ExtensionId<Extension>>idFromJavaSingletonAccessor(String extensionIdFQCN) voidHook for ActorSystem to load extensions on startupvoidloadExtensionsFor(String key, boolean throwOnLoadFail) <T extends Extension>
TregisterExtension(ExtensionId<T> ext) Registers the provided extension and creates its payload, if this extension isn't already registered This method has putIfAbsent-semantics, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
-
Method Details
-
createExtensionInstance
-
extension
Description copied from interface:ExtensionsReturns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered. This method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution- Specified by:
extensionin interfaceExtensions
-
findExtension
Returns any extension registered to the specified Extension or returns null if not registered -
hasExtension
Description copied from interface:ExtensionsReturns whether the specified extension is already registered, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution- Specified by:
hasExtensionin interfaceExtensions
-
idFromJavaSingletonAccessor
-
loadExtensions
void loadExtensions()Hook for ActorSystem to load extensions on startup -
loadExtensionsFor
-
registerExtension
Description copied from interface:ExtensionsRegisters the provided extension and creates its payload, if this extension isn't already registered This method has putIfAbsent-semantics, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution- Specified by:
registerExtensionin interfaceExtensions
-