Class ImmutableExtensionPointCollection<T extends ExtensionPoint<?>>

java.lang.Object
com.inductiveautomation.ignition.gateway.config.ImmutableExtensionPointCollection<T>
All Implemented Interfaces:
ExtensionPointCollection<T>

public class ImmutableExtensionPointCollection<T extends ExtensionPoint<?>> extends Object implements ExtensionPointCollection<T>
An immutable collection of extension points. See build(ResourceType, ModuleManager, ExtensionPoint[]) for a way to build an instance of this class. This class can be created very early in the lifecycle of a gateway (after modules are loaded, but before they are set up or started). This because as of 8.3, modules have a static lifecycle fixed to the gateway, so we know that the set of possible extension points cannot change.

Uses a "hollywood style" method of collecting extension point implementations. See GatewayModuleHook.getExtensionPoints();

  • Method Details

    • getType

      public Optional<T> getType(String typeId)
      Specified by:
      getType in interface ExtensionPointCollection<T extends ExtensionPoint<?>>
    • getTypes

      public List<T> getTypes()
      Specified by:
      getTypes in interface ExtensionPointCollection<T extends ExtensionPoint<?>>
    • hasType

      public boolean hasType(String typeId)
      Specified by:
      hasType in interface ExtensionPointCollection<T extends ExtensionPoint<?>>
    • build

      public static <T extends ExtensionPoint<?>> ExtensionPointCollection<T> build(ResourceType resourceType, ModuleManager moduleManager, T... types)
      Builds an immutable collection of extension points, incorporating any extension points exposed by modules, as well as a static list of extension points implementations
      Type Parameters:
      T - The type of extension point.
      Parameters:
      resourceType - The resource type of the extension points
      moduleManager - The module manager from the gateway context.
      types - A list of extension points to include in the collection.
      Returns:
      An immutable collection of extension points.
    • build

      public static <T extends ExtensionPoint<?>> ExtensionPointCollection<T> build(ResourceType resourceType, ModuleManager moduleManager, List<T> types)
      Builds an immutable collection of extension points, incorporating any extension points exposed by modules, as well as a static list of extension points implementations.
      Type Parameters:
      T - The type of extension point.
      Parameters:
      resourceType - The resource type of the extension points
      moduleManager - The module manager from the gateway context.
      types - A list of extension point types to include in the collection.
      Returns:
      An immutable collection of extension points.
    • build

      public static <T extends ExtensionPoint<?>> ExtensionPointCollection<T> build(T... types)
      Builds an immutable collection of extension points, incorporating any extension points exposed by modules
      Type Parameters:
      T - The type of extension point.
      Parameters:
      types - A list of extension points to include in the collection.
      Returns:
      An immutable collection of extension points.