Package gda.jython

Class JythonServer.JythonServerThread

java.lang.Object
java.lang.Thread
gda.jython.JythonServer.JythonServerThread
All Implemented Interfaces:
Runnable
Enclosing class:
JythonServer

public abstract static class JythonServer.JythonServerThread extends Thread
Base class for all the types of thread started by the JythonServer to run Jython commands.
  • Constructor Details

  • Method Details

    • run

      public abstract void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • requestInput

      public String requestInput(String prompt) throws InterruptedException
      Throws:
      InterruptedException
    • getJythonServerThreadId

      public String getJythonServerThreadId()
    • getCommand

      public String getCommand()
      Access the command responsible for the thread
      Returns:
      command string
    • isScript

      public boolean isScript()
      Check if this thread is running a script

      Used when pausing scripts.

      Returns:
      true if this thread represents a script
    • getCommandThreadType

      public CommandThreadType getCommandThreadType()
    • getCreationTimestamp

      public LocalDateTime getCreationTimestamp()
    • getThreadInfo

      public CommandThreadInfo getThreadInfo()
    • toString

      public String toString()
      Overrides:
      toString in class Thread
    • getAuthorisationLevel

      public int getAuthorisationLevel()
    • clientId

      public static Optional<Integer> clientId()
      Get the client ID of the current thread if available