Package ffx.ui

Class FFXExec

java.lang.Object
ffx.ui.FFXExec
All Implemented Interfaces:
Runnable

public class FFXExec extends Object implements Runnable
FFXExec encapsulates a native replacement for the JDK System.exec() method. TINKER programs are executed in their own thread through a call to a Native method called "FFXExec" which in turn calls the function "system()". The reason we are not using the System.exec() methods is that some TINKER routines execute indefinitely. Users may want to exit Force Field X and shut down the JVM after launching a dynamics run, for example. In this case the thread should not be dependent on a JVM instance.
Author:
Michael J. Schnieders
  • Constructor Details

    • FFXExec

      public FFXExec(FFXSystem s, String n, String a, String d, MainPanel m, File file, boolean o)
      Constructor
      Parameters:
      s - FFXSystem the Native command will execute on
      n - Name of the log file
      a - Command to execute
      d - Directory to launch the command in
      m - MainPanel
      file - File to open
      o - Load the resulting version file onto the passed FFXSystem
  • Method Details

    • getReturnValue

      public int getReturnValue()
      Getter for the field returnValue.
      Returns:
      a int.
    • isAlive

      public boolean isAlive()
      isAlive
      Returns:
      a boolean.
    • run

      public void run()
      Executes the native call to "System()" and notifies the ResultPanel upon completion. This should only be called indirectly by Thread.Start()
      Specified by:
      run in interface Runnable
    • toString

      public String toString()

      Commons.Lang Style toString.

      Overrides:
      toString in class Object