Class Status

  • All Implemented Interfaces:
    java.io.Serializable

    public class Status
    extends Invocation
    This class encapsulates the exit code or reason of termination for a given job. The class itself contains the raw exit code. It also aggregates an instance of the JobStatus interface, which describes more clearly failure, regular execution, signal and suspension.
    Version:
    $Revision$
    Author:
    Jens-S. Vöckler, Yong Zhao
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private JobStatus m_jobStatus
      This member variable contains the real status of the job.
      private int m_status
      The raw exit code, unparsed and unprepared.
    • Constructor Summary

      Constructors 
      Constructor Description
      Status()
      Default c'tor: Construct a hollow shell and allow further information to be added later.
      Status​(int raw)
      Constructs a layer with the raw exit code.
      Status​(int raw, JobStatus status)
      Constructs the complete class with raw exit code and a status child describing the exit code.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      JobStatus getJobStatus()
      Accessor
      int getStatus()
      Accessor
      void setJobStatus​(JobStatus jobStatus)
      Accessor.
      void setStatus​(int status)
      Accessor.
      void toString​(java.io.Writer stream)
      Converts the active state into something meant for human consumption.
      void toXML​(java.io.Writer stream, java.lang.String indent, java.lang.String namespace)
      Dump the state of the current element as XML output.
      • Methods inherited from class org.griphyn.vdl.Chimera

        escape, quote, toString, toXML, toXML, writeAttribute
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • m_status

        private int m_status
        The raw exit code, unparsed and unprepared. There are several interpretation of the value. Usually, it is interpreted as unsigned 16 bit value. The high byte contains the exit code. The low byte has the core dump flag as MSB, and the rest denote the signal number. A value of -1 denotes a failure from the grid launcher before starting the job.
      • m_jobStatus

        private JobStatus m_jobStatus
        This member variable contains the real status of the job.
    • Constructor Detail

      • Status

        public Status()
        Default c'tor: Construct a hollow shell and allow further information to be added later.
      • Status

        public Status​(int raw)
        Constructs a layer with the raw exit code.
        Parameters:
        raw - is the raw exit code to store.
      • Status

        public Status​(int raw,
                      JobStatus status)
        Constructs the complete class with raw exit code and a status child describing the exit code.
        Parameters:
        raw - is the raw exit status
        status - is the description of the kind of exit.
    • Method Detail

      • getStatus

        public int getStatus()
        Accessor
        See Also:
        setStatus(int)
      • setStatus

        public void setStatus​(int status)
        Accessor.
        Parameters:
        status -
        See Also:
        getStatus()
      • setJobStatus

        public void setJobStatus​(JobStatus jobStatus)
        Accessor.
        Parameters:
        jobStatus - is an instance of the class describing the real reason for program termination on the remote end.
        See Also:
        getJobStatus()
      • toString

        public void toString​(java.io.Writer stream)
                      throws java.io.IOException
        Converts the active state into something meant for human consumption. The method will be called when recursively traversing the instance tree.
        Specified by:
        toString in class org.griphyn.vdl.Chimera
        Parameters:
        stream - is a stream opened and ready for writing. This can also be a string stream for efficient output.
        Throws:
        java.io.IOException - if something fishy happens to the stream.
      • toXML

        public void toXML​(java.io.Writer stream,
                          java.lang.String indent,
                          java.lang.String namespace)
                   throws java.io.IOException
        Dump the state of the current element as XML output. This function traverses all sibling classes as necessary, and converts the data into pretty-printed XML output. The stream interface should be able to handle large output efficiently.
        Specified by:
        toXML in class org.griphyn.vdl.Chimera
        Parameters:
        stream - is a stream opened and ready for writing. This can also be a string stream for efficient output.
        indent - is a String of spaces used for pretty printing. The initial amount of spaces should be an empty string. The parameter is used internally for the recursive traversal. If a null value is specified, no indentation nor linefeeds will be generated.
        namespace - is the XML schema namespace prefix. If neither empty nor null, each element will be prefixed with this prefix, and the root element will map the XML namespace.
        Throws:
        java.io.IOException - if something fishy happens to the stream.
        See Also:
        BufferedWriter