Interface ExtensionsImpl

All Superinterfaces:
Extensions

public interface ExtensionsImpl extends Extensions
INTERNAL API

Actor system extensions registry

  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends Extension>
    T
     
    <T extends Extension>
    T
    Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered.
    <T extends Extension>
    T
    Returns any extension registered to the specified Extension or returns null if not registered
    boolean
    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 execution
    scala.util.Try<ExtensionId<Extension>>
     
    void
    Hook for ActorSystem to load extensions on startup
    void
    loadExtensionsFor(String key, boolean throwOnLoadFail)
     
    <T extends Extension>
    T
    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

      <T extends Extension> T createExtensionInstance(ExtensionId<T> ext)
    • extension

      <T extends Extension> T extension(ExtensionId<T> ext)
      Description copied from interface: Extensions
      Returns 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:
      extension in interface Extensions
    • findExtension

      <T extends Extension> T findExtension(ExtensionId<T> ext)
      Returns any extension registered to the specified Extension or returns null if not registered
    • hasExtension

      boolean hasExtension(ExtensionId<? extends Extension> ext)
      Description copied from interface: Extensions
      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 execution
      Specified by:
      hasExtension in interface Extensions
    • idFromJavaSingletonAccessor

      scala.util.Try<ExtensionId<Extension>> idFromJavaSingletonAccessor(String extensionIdFQCN)
    • loadExtensions

      void loadExtensions()
      Hook for ActorSystem to load extensions on startup
    • loadExtensionsFor

      void loadExtensionsFor(String key, boolean throwOnLoadFail)
    • registerExtension

      <T extends Extension> T registerExtension(ExtensionId<T> ext)
      Description copied from interface: Extensions
      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
      Specified by:
      registerExtension in interface Extensions