Interface ExportRegistry


  • public interface ExportRegistry
    A registry of Exports shared between scripts.

    Allows scripts to share persistent state, or provide a resource in a known namespace.

    Some scripts will be designed to be totally stateless, and may use exports to store state between invocations.

    • Method Detail

      • get

        <T> Export<T> get​(String name)
        Gets an export
        Type Parameters:
        T - the export type
        Parameters:
        name - the name of the export
        Returns:
        the export
      • pointer

        default <T> Export.Pointer<T> pointer​(String name)
        Gets a pointer to an export
        Type Parameters:
        T - the export type
        Parameters:
        name - the name of the export
        Returns:
        a pointer
        See Also:
        Export.Pointer
      • remove

        void remove​(String name)
        Deletes an export
        Parameters:
        name - the name of the export to remove.
      • getAll

        Collection<Export<?>> getAll()
        Returns a collection of all known exports.
        Returns:
        a collection of known exports