plgrid
Class GridJobInfo

java.lang.Object
  extended by plgrid.GridJobInfo

public class GridJobInfo
extends java.lang.Object

Holds job information


Field Summary
static int STATE_ERRORED
          Indicates that state of the job is errored
static int STATE_FINISHED
          Indicates that state of the job is finished
static int STATE_NOT_FOUND
          Indicates that the job is not found
static int STATE_QUEUED
          Indicates that state of the job is queued
static int STATE_RUNNING
          Indicates that state of the job is running
static int STATE_UNKNOWN
          Indicates that state of the job is unknown
 
Constructor Summary
GridJobInfo(java.lang.String jobId)
           
 
Method Summary
 void addComplexVariable(java.lang.String name, java.lang.String value)
          Adds complex variable into the complex variables list
static GridJobInfo fromXML(java.lang.String xml)
           
static GridJobInfo fromXMLElement(nu.xom.Element gjiElement)
           
 java.util.Map<java.lang.String,java.lang.String> getComplexVariables()
          Returns list of complex Variables
 int getExitStatus()
          Returns the exit status of the job
 long getFinishTime()
          Returns finish time of the job
 java.lang.String getJobId()
          Returns the job Id
 long getQueuedTime()
          Returns queued time of the job
 long getStartTime()
          Returns start time of the job
 int getState()
          Returns state of the job
 void removeComplexVariable(java.lang.String name)
          Removes specified complex variable from the list
 void setExitStatus(int exitStatus)
          Sets the exit status of the job
 void setFinishTime(long finishTime)
          Sets the finish time
 void setQueuedTime(long queuedTime)
          Sets the queued time
 void setStartTime(long startTime)
          Sets the start time
 void setState(int state)
          Sets the state of the job
 java.lang.String toXML()
           
 nu.xom.Element toXMLElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_UNKNOWN

public static final int STATE_UNKNOWN
Indicates that state of the job is unknown

See Also:
Constant Field Values

STATE_QUEUED

public static final int STATE_QUEUED
Indicates that state of the job is queued

See Also:
Constant Field Values

STATE_RUNNING

public static final int STATE_RUNNING
Indicates that state of the job is running

See Also:
Constant Field Values

STATE_FINISHED

public static final int STATE_FINISHED
Indicates that state of the job is finished

See Also:
Constant Field Values

STATE_NOT_FOUND

public static final int STATE_NOT_FOUND
Indicates that the job is not found

See Also:
Constant Field Values

STATE_ERRORED

public static final int STATE_ERRORED
Indicates that state of the job is errored

See Also:
Constant Field Values
Constructor Detail

GridJobInfo

public GridJobInfo(java.lang.String jobId)
Method Detail

addComplexVariable

public void addComplexVariable(java.lang.String name,
                               java.lang.String value)
Adds complex variable into the complex variables list

Parameters:
name - Name of complex Variable
value - Value of complex Variable

removeComplexVariable

public void removeComplexVariable(java.lang.String name)
Removes specified complex variable from the list

Parameters:
name -

getComplexVariables

public java.util.Map<java.lang.String,java.lang.String> getComplexVariables()
Returns list of complex Variables

Returns:
Map of complex variables ( name, value )

setState

public void setState(int state)
Sets the state of the job

Parameters:
state - One of following STATE_UNKNOWN, STATE_QUEUED, STATE_RUNNING

setStartTime

public void setStartTime(long startTime)
Sets the start time

Parameters:
startTime - Start time in millisecconds

setQueuedTime

public void setQueuedTime(long queuedTime)
Sets the queued time

Parameters:
queuedTime - Start time in millisecconds

setFinishTime

public void setFinishTime(long finishTime)
Sets the finish time

Parameters:
finishTime - Finish time in millisecconds

setExitStatus

public void setExitStatus(int exitStatus)
Sets the exit status of the job

Parameters:
exitStatus - The exit status of the job

getJobId

public java.lang.String getJobId()
Returns the job Id

Returns:
Job ID

getState

public int getState()
Returns state of the job

Returns:
State of the job

getStartTime

public long getStartTime()
Returns start time of the job

Returns:
Start time in milliseconds

getQueuedTime

public long getQueuedTime()
Returns queued time of the job

Returns:
Queued time in milliseconds

getFinishTime

public long getFinishTime()
Returns finish time of the job

Returns:
Finish time in milliseconds

getExitStatus

public int getExitStatus()
Returns the exit status of the job

Returns:
Exit status of the job

toXMLElement

public nu.xom.Element toXMLElement()

toXML

public java.lang.String toXML()

fromXMLElement

public static GridJobInfo fromXMLElement(nu.xom.Element gjiElement)

fromXML

public static GridJobInfo fromXML(java.lang.String xml)