Class JavaProcess

java.lang.Object
mgui.pipelines.PipelineProcess
mgui.pipelines.JavaProcess
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, InterfaceObject, NamedObject, TreeObject, CleanableObject, XMLObject, IconObject
Direct Known Subclasses:
CaminoProcess

public class JavaProcess
extends PipelineProcess
Represents a Java process; i.e., a class containing a main method which allows it to be run as a process.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
See Also:
Serialized Form
  • Field Details

    • main_class

      protected java.lang.String main_class
    • is_interrupted

      protected boolean is_interrupted
    • current_system_processes

      protected java.util.HashMap<java.lang.Long,​CommandInstance> current_system_processes
  • Constructor Details

    • JavaProcess

      public JavaProcess​(PipelineProcess process)
    • JavaProcess

      public JavaProcess​(java.lang.String name, java.lang.String main_class)
    • JavaProcess

      public JavaProcess​(java.lang.String name, java.lang.String main_class, java.lang.String input_parameter, java.lang.String output_parameter)
    • JavaProcess

      public JavaProcess​(java.lang.String name, java.lang.String main_class, java.lang.String input_parameter, java.lang.String output_parameter, java.lang.String logger)
  • Method Details

    • setFromProcess

      public void setFromProcess​(PipelineProcess process)
      Overrides:
      setFromProcess in class PipelineProcess
    • getObjectIcon

      public javax.swing.Icon getObjectIcon()
      Description copied from interface: IconObject
      Returns the Icon associated with this object.
      Specified by:
      getObjectIcon in interface IconObject
      Overrides:
      getObjectIcon in class PipelineProcess
      Returns:
    • showHelp

      public void showHelp()
      Description copied from class: PipelineProcess
      Attempt to display the associated help message
      Specified by:
      showHelp in class PipelineProcess
    • getSuccessMessage

      public java.lang.String getSuccessMessage()
      Description copied from class: PipelineProcess
      Returns the message to be displayed when this process has succeeded.
      Specified by:
      getSuccessMessage in class PipelineProcess
      Returns:
    • getFailureMessage

      public java.lang.String getFailureMessage()
      Description copied from class: PipelineProcess
      Returns the message to be displayed when this process has failed.
      Specified by:
      getFailureMessage in class PipelineProcess
      Returns:
    • clone

      public java.lang.Object clone()
      Specified by:
      clone in class PipelineProcess
    • run

      public boolean run​(java.lang.String[] args, long uid) throws PipelineException
      Description copied from class: PipelineProcess
      Runs an instance of this process
      Specified by:
      run in class PipelineProcess
      Parameters:
      args - Arguments for the process
      Returns:
      Throws:
      PipelineException
    • interrupt

      public boolean interrupt​(long uid) throws PipelineException
      Description copied from class: PipelineProcess
      Interrupts an instance of this process
      Specified by:
      interrupt in class PipelineProcess
      Parameters:
      uid - The unique identifier of the process instance to interrupt
      Returns:
      Throws:
      PipelineException
    • isInterrupted

      public boolean isInterrupted()
    • getMainClass

      public java.lang.String getMainClass()
    • setMainClass

      public void setMainClass​(java.lang.String mainClass)
    • getXML

      public java.lang.String getXML​(int tab)
      Description copied from interface: XMLObject
      Returns this object's XML representation as a single string. NOTE: this is not feasible for larger objects and containers, thus may not be implemented for these objects. Use the XMLObject.writeXML(int,java.io.Writer,mgui.io.standard.xml.XMLOutputOptions,mgui.interfaces.ProgressUpdater) functions to write larger objects to file.
      Specified by:
      getXML in interface XMLObject
      Overrides:
      getXML in class PipelineProcess
      Parameters:
      tab - The number of tabs to place before the opening XML wrapper
      Returns:
    • getInputArgs

      public java.lang.String[] getInputArgs​(java.lang.String[] args, java.lang.String input_file)
      Description copied from class: PipelineProcess
      Alters an argument array to set an input file for this process, and returns the result.
      Specified by:
      getInputArgs in class PipelineProcess
      Returns:
    • getOutputArgs

      public java.lang.String[] getOutputArgs​(java.lang.String[] args, java.lang.String input_file)
      Description copied from class: PipelineProcess
      Alters an argument array to set an output file for this process, and returns the result.
      Specified by:
      getOutputArgs in class PipelineProcess
      Returns: