com.altair.hwm.comm.loadsubmission.ecompute
Class HWMEComputeJob

java.lang.Object
  extended by com.altair.hwm.comm.loadsubmission.ecompute.HWMEComputeJob
All Implemented Interfaces:
IHWMJob

public class HWMEComputeJob
extends java.lang.Object
implements IHWMJob

Title: HWMEComputeJob

Description: This class gives an implementation to the interface IHWMJob. The IHWMJob interface for a job to be submitted to any job submission system. It abstracts the parameters that comprise of the job and provides API's to access and modify them. Company: Altair Engineering, Inc. Author:Shashi


Constructor Summary
HWMEComputeJob()
          Constructor bare bones constructor
HWMEComputeJob(int njobID, int nProfileID, java.lang.String strProfileName)
          Full fledged constructor
HWMEComputeJob(java.lang.String strJobID)
          Constructor Create a job instance from the job ID
 
Method Summary
 void AddFile(java.io.File solverDeckFile)
          Adds a file to this job First file is usually the deck file
 void AddJobParams(java.util.Vector vectJobParams)
          Adds a vector of job related parameters for the job.
 void AddPostProcessingParams(java.util.Vector vectPostParams)
          Adds a vector of post processor parameters for the job.
 void AddSolverParams(java.util.Vector vectSolverParams)
          Adds a vector of solver parameters for the job.
 java.util.Vector GetFiles()
           
 java.lang.String GetJobID()
          This method gets the ID for this job represented as a string.
 int GetJobIdAsInt()
          Get the jobID for this job
 java.lang.String GetJobProfile()
          Get the E-Compute profile name
 int GetJobProfileId()
          Get the E-Compute profile ID
 IHWMJobStatus GetJobStatus()
          Get the status of this job
 IHWMJobStatus GetJobStatus(IHWMJobManager jobMgr)
          This method gets the Job status which is an instance of IHWMJobStatus.
 java.lang.String GetName()
          Gets the name of the job.
 java.io.File GetOutputDir()
          Give the results output dir for this job
 void readExternal(java.io.ObjectInput in)
          ReadExternal method of the Externalizable interface
 void RemoveFile(java.io.File solverDeckFile)
          This method removes a solver deck file to a job.
 void RemoveJobParams(java.util.Vector vectJobParams)
          Removes a vector of job related parameters for the job.
 void RemovePostProcessingParams(java.util.Vector vectPostParams)
          Removes a vector of post processor parameters for the job.
 void RemoveSolverParams(java.util.Vector vectSolverParams)
          Removes a vector of solver parameters from the job.
 void SetAsMaster(java.io.File solverDeckFile)
          Sets the specified deck file as the master file.
 void SetJobId(int njobID)
          Set a job ID on the default job object
 void SetName(java.lang.String strName)
          Sets the name of the Job instance.
 void SetOutputDir(java.io.File dir)
          Set the results output directory for this job
 void UpdateJobProfile(java.lang.String strProfileName)
          Update the E-Compute profile name
 void UpdateJobProfileId(int nProfileID)
          Updates the profile ID on this job
 void writeExternal(java.io.ObjectOutput out)
          WriteExternal method of the Externalizable interface
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HWMEComputeJob

public HWMEComputeJob()
Constructor bare bones constructor


HWMEComputeJob

public HWMEComputeJob(java.lang.String strJobID)
Constructor Create a job instance from the job ID


HWMEComputeJob

public HWMEComputeJob(int njobID,
                      int nProfileID,
                      java.lang.String strProfileName)
Full fledged constructor

Parameters:
jobID -
profileID -
strProfileName -
deckFile -
Method Detail

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
ReadExternal method of the Externalizable interface

Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
WriteExternal method of the Externalizable interface

Throws:
java.io.IOException

GetJobIdAsInt

public int GetJobIdAsInt()
Get the jobID for this job

Returns:
m_nJobId

GetJobID

public java.lang.String GetJobID()
Description copied from interface: IHWMJob
This method gets the ID for this job represented as a string.

Specified by:
GetJobID in interface IHWMJob
Returns:
The ID for this job represented as a string.

SetJobId

public void SetJobId(int njobID)
Set a job ID on the default job object

Parameters:
jobID -

GetJobProfileId

public int GetJobProfileId()
Get the E-Compute profile ID

Returns:
m_nProfileId

GetJobProfile

public java.lang.String GetJobProfile()
Get the E-Compute profile name

Returns:
m_strProfileName

UpdateJobProfileId

public void UpdateJobProfileId(int nProfileID)
Updates the profile ID on this job

Parameters:
profileID -

UpdateJobProfile

public void UpdateJobProfile(java.lang.String strProfileName)
Update the E-Compute profile name

Parameters:
strProfileName -

SetOutputDir

public void SetOutputDir(java.io.File dir)
Set the results output directory for this job

Parameters:
dir -

GetOutputDir

public java.io.File GetOutputDir()
Give the results output dir for this job

Returns:

AddFile

public void AddFile(java.io.File solverDeckFile)
Adds a file to this job First file is usually the deck file

Specified by:
AddFile in interface IHWMJob
Parameters:
solverDeckFile -

AddSolverParams

public void AddSolverParams(java.util.Vector vectSolverParams)
Description copied from interface: IHWMJob
Adds a vector of solver parameters for the job. Ex of solver params : adding subroutine nams etc.

Specified by:
AddSolverParams in interface IHWMJob
Parameters:
vectSolverParams - A vector of solver parameters to be added for the job.

AddJobParams

public void AddJobParams(java.util.Vector vectJobParams)
Description copied from interface: IHWMJob
Adds a vector of job related parameters for the job. Ex of a job related params: memory required, solver version etc

Specified by:
AddJobParams in interface IHWMJob
Parameters:
vectJobParams - A vector of job parameters to be added for the job.

AddPostProcessingParams

public void AddPostProcessingParams(java.util.Vector vectPostParams)
Description copied from interface: IHWMJob
Adds a vector of post processor parameters for the job. ex: some arguments or an executable which will take existing solver output file and create another set of files.

Specified by:
AddPostProcessingParams in interface IHWMJob
Parameters:
vectPostParams - A vector of post processor parameters to be added for the job.

GetJobStatus

public IHWMJobStatus GetJobStatus(IHWMJobManager jobMgr)
This method gets the Job status which is an instance of IHWMJobStatus.

Returns:
Status of this job as an instance of IHWMJobStatus

SetName

public void SetName(java.lang.String strName)
             throws java.lang.Exception
Sets the name of the Job instance.

Specified by:
SetName in interface IHWMJob
Parameters:
strName - The name of the job to be set.
Throws:
java.lang.Exception

GetName

public java.lang.String GetName()
                         throws java.lang.Exception
Gets the name of the job.

Specified by:
GetName in interface IHWMJob
Returns:
A string representing the name of the job.
Throws:
java.lang.Exception

RemoveFile

public void RemoveFile(java.io.File solverDeckFile)
                throws java.lang.Exception
This method removes a solver deck file to a job. Removing multiple files from a job definition is to be allowed.

Specified by:
RemoveFile in interface IHWMJob
Parameters:
solverDeckFile - The solver deck file to be removed from the job.
Throws:
java.lang.Exception

RemoveSolverParams

public void RemoveSolverParams(java.util.Vector vectSolverParams)
                        throws java.lang.Exception
Removes a vector of solver parameters from the job. Ex of solver params : adding subroutine nams etc.

Specified by:
RemoveSolverParams in interface IHWMJob
Parameters:
vectSolverParams - A vector of solver parameters to be removed from the job.
Throws:
java.lang.Exception

RemoveJobParams

public void RemoveJobParams(java.util.Vector vectJobParams)
                     throws java.lang.Exception
Removes a vector of job related parameters for the job. Ex of a job related params: memory required, solver version etc

Specified by:
RemoveJobParams in interface IHWMJob
Parameters:
vectJobParams - A vector of job parameters to be removed from the job.
Throws:
java.lang.Exception

RemovePostProcessingParams

public void RemovePostProcessingParams(java.util.Vector vectPostParams)
                                throws java.lang.Exception
Removes a vector of post processor parameters for the job. ex: some arguments or an executable which will take existing solver output file and create another set of files.

Specified by:
RemovePostProcessingParams in interface IHWMJob
Parameters:
vectPostParams - A vector of post processor parameters to be removed from the job.
Throws:
java.lang.Exception

SetAsMaster

public void SetAsMaster(java.io.File solverDeckFile)
                 throws java.lang.Exception
Sets the specified deck file as the master file.

Specified by:
SetAsMaster in interface IHWMJob
Parameters:
solverDeckFile - The specified deck file to be set as the master file.
Throws:
java.lang.Exception

GetFiles

public java.util.Vector GetFiles()

GetJobStatus

public IHWMJobStatus GetJobStatus()
Get the status of this job

Specified by:
GetJobStatus in interface IHWMJob