g-Eclipse
Release 1.0.0

eu.geclipse.core.jobs
Class GridJobStatus

java.lang.Object
  extended by eu.geclipse.core.jobs.GridJobStatus
All Implemented Interfaces:
IGridJobStatus

public class GridJobStatus
extends java.lang.Object
implements IGridJobStatus


Field Summary
static GridJobStatus UNKNOWN_STATUS
           
static java.lang.String XML_ATTRIBUTE_CLASS
           
static java.lang.String XML_ROOT
           
static java.lang.String XML_STATUSDATA
           
static java.lang.String XML_STATUSNAME
           
static java.lang.String XML_STATUSREASON
           
static java.lang.String XML_STATUSTYPE
           
static java.lang.String XML_STATUSUPDATEDATE
           
 
Fields inherited from interface eu.geclipse.core.model.IGridJobStatus
_ALL, ABORTED, DONE, PURGED, RUNNING, SUBMITTED, UNDEF, UNKNOWN, WAITING
 
Constructor Summary
GridJobStatus()
           
GridJobStatus(org.w3c.dom.Node statusNode)
           
GridJobStatus(java.lang.String name, int type)
           
 
Method Summary
 boolean canChange()
           Return true if the status of the job can be changed in the future yet.
 java.lang.String getJobStatusData()
           
 java.util.Date getLastUpdateTime()
          Returns the date of last status update.
 java.lang.String getName()
          Returns the name of the status.
 java.lang.String getReason()
          Return the explanation why the job is in the specific state.
 int getType()
          Returns the type of the status.
 java.lang.String getXML()
           
 boolean isSuccessful()
          Default behaviour.
 void setXMLNode(org.w3c.dom.Node statusNode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_ROOT

public static final java.lang.String XML_ROOT

XML_STATUSNAME

public static final java.lang.String XML_STATUSNAME

XML_STATUSTYPE

public static final java.lang.String XML_STATUSTYPE

XML_STATUSREASON

public static final java.lang.String XML_STATUSREASON

XML_STATUSDATA

public static final java.lang.String XML_STATUSDATA

XML_STATUSUPDATEDATE

public static final java.lang.String XML_STATUSUPDATEDATE

XML_ATTRIBUTE_CLASS

public static final java.lang.String XML_ATTRIBUTE_CLASS
See Also:
Constant Field Values

UNKNOWN_STATUS

public static final GridJobStatus UNKNOWN_STATUS
Constructor Detail

GridJobStatus

public GridJobStatus()

GridJobStatus

public GridJobStatus(java.lang.String name,
                     int type)

GridJobStatus

public GridJobStatus(org.w3c.dom.Node statusNode)
              throws ProblemException
Throws:
ProblemException
Method Detail

setXMLNode

public void setXMLNode(org.w3c.dom.Node statusNode)
                throws ProblemException
Throws:
ProblemException

canChange

public boolean canChange()
Description copied from interface: IGridJobStatus

Return true if the status of the job can be changed in the future yet. Return false if status if final (e.g. Aborted, Done, Failed)

To check if job succeeded use method isSuccessfull

Specified by:
canChange in interface IGridJobStatus
Returns:
true if status can change yet

isSuccessful

public boolean isSuccessful()
Default behaviour. Can be overritten in subclasses.

Specified by:
isSuccessful in interface IGridJobStatus
Returns:
true if the job was finished successfully

getJobStatusData

public java.lang.String getJobStatusData()

getXML

public final java.lang.String getXML()

getName

public java.lang.String getName()
Description copied from interface: IGridJobStatus
Returns the name of the status. This can be any string and is not interpreted. It will be just printed in the status window to show the status to the user. To check the meaning of the status use methods canChange(), isSuccessful() or middleware specific implementation.

Specified by:
getName in interface IGridJobStatus
Returns:
Name of the status

getType

public int getType()
Description copied from interface: IGridJobStatus
Returns the type of the status. This is integer value and defines the meaning of the status. This value will be used for filtering job list to those with a given status type. Type can be also used by user interface to mark jobs belonging to the same type with the same graphical elements (e.g. icons, colours)

Specified by:
getType in interface IGridJobStatus
Returns:
Name of the status

getReason

public java.lang.String getReason()
Description copied from interface: IGridJobStatus
Return the explanation why the job is in the specific state. Can give more detailed information than just status name.

Specified by:
getReason in interface IGridJobStatus
Returns:
String with explanation

getLastUpdateTime

public java.util.Date getLastUpdateTime()
Description copied from interface: IGridJobStatus
Returns the date of last status update. It should be the time of last contact with middleware service and not the time of last status change.

Specified by:
getLastUpdateTime in interface IGridJobStatus
Returns:
time of last update

g-Eclipse
Release 1.0.0