Class RunLocalScript.LocalScriptPathLoader

java.lang.Object
com.illumon.iris.console.utils.RunLocalScript.LocalScriptPathLoader
All Implemented Interfaces:
ScriptPathLoader
Enclosing class:
RunLocalScript

public static class RunLocalScript.LocalScriptPathLoader extends Object implements ScriptPathLoader
  • Method Details

    • lock

      public void lock()
      Description copied from interface: ScriptPathLoader
      Acquire a read lock. Use before invoking any of the get* methods, and hold for as long as consistency is required for this loader.
      Specified by:
      lock in interface ScriptPathLoader
    • unlock

      public void unlock()
      Description copied from interface: ScriptPathLoader
      Release a previously acquired read lock.
      Specified by:
      unlock in interface ScriptPathLoader
    • getAvailableScriptDisplayPaths

      public Set<String> getAvailableScriptDisplayPaths()
      Specified by:
      getAvailableScriptDisplayPaths in interface ScriptPathLoader
      Returns:
      The display paths currently available from this loader.
    • getScriptBodyByDisplayPath

      public String getScriptBodyByDisplayPath(@NotNull String displayPath)
      Specified by:
      getScriptBodyByDisplayPath in interface ScriptPathLoader
      Parameters:
      displayPath - The display path to load a script for.
      Returns:
      The body of the requested script.
    • getScriptBodyByRelativePath

      public String getScriptBodyByRelativePath(@NotNull String relativePath) throws IOException
      Specified by:
      getScriptBodyByRelativePath in interface ScriptPathLoader
      Parameters:
      relativePath - The relative path to load a script for.
      Returns:
      The body of the requested script.
      Throws:
      IOException - If a problem occurred reading the script body.
    • refresh

      public void refresh()
      Description copied from interface: ScriptPathLoader
      Refresh the loader internally. Will respect existing read locks.
      Specified by:
      refresh in interface ScriptPathLoader
    • close

      public void close()
      Description copied from interface: ScriptPathLoader
      Free resources associated with this loader.
      Specified by:
      close in interface ScriptPathLoader