com.altair.hwm.interfaces.loadsubmission
Interface IHWMJobManager

All Known Implementing Classes:
HWMEComputeJobManager, HWMLocalJobManager

public interface IHWMJobManager


Method Summary
 void AddJobListener(IHWMJobListener listener, IHWMJob hwmJob)
          This method adds the specified listener in order to get call back events from the specified job.
 IHWMJob CreateJobInstance()
          This method creates an instance of IHWMJob without a GUI This mode is primarily used for creating a default job in to which different parameters can be set through APIs available in IHWMJob.
 IHWMJob CreateJobInstanceWithDialog()
          This method creates an instance of IHWMJob with parameters set in a GUI dialog.
 void DownloadResults(java.lang.String strJobID, java.io.File fileDestDir)
          This method downloads the result files for the job identified by the specified JobID to the specified directory.
 IHWMJob GetJobInstance(java.lang.String strJobID)
          This method returns the IHWMJob instance held by IHWMJobManager against the specified JobID.
 IHWMJobStatus GetJobStatus(IHWMJob hwmJob)
          This method returns the status of the specified job as an instance of IHWMJobStatus.
 IHWMJobStatus GetJobStatus(java.lang.String strJobStatus)
          This is a utility method to convert a String strJobStatus in to an instance of IHWMJobStatus.
 boolean LoginToJobSubmissionSystem()
          Login into the job submission system using no arguments In this case the login gui will pop up
 boolean LoginToJobSubmissionSystem(java.lang.String strLoginName, java.lang.String strPasswd)
          Login into the job submission system using specified login name and passwd
 void RemoveListener(IHWMJobListener listener, IHWMJob hwmJob)
          This method removes the specified listener in order to stop getting call back events from the specified job.
 java.lang.String SubmitJob(IHWMJob job)
          This method submits the specified job for computation.
 

Method Detail

LoginToJobSubmissionSystem

boolean LoginToJobSubmissionSystem(java.lang.String strLoginName,
                                   java.lang.String strPasswd)
                                   throws java.lang.Exception
Login into the job submission system using specified login name and passwd

Parameters:
strLoginName - Thelogin name for job submission system
strPasswd - The password for job submission system.
Returns:
boolean value indicating whether login was successful or not. true=>successful false=>not successful.
Throws:
java.lang.Exception

LoginToJobSubmissionSystem

boolean LoginToJobSubmissionSystem()
                                   throws java.lang.Exception
Login into the job submission system using no arguments In this case the login gui will pop up

Returns:
boolean value indicating whether login was successful or not. true=>successful false=>not successful.
Throws:
java.lang.Exception

SubmitJob

java.lang.String SubmitJob(IHWMJob job)
                           throws java.lang.Exception
This method submits the specified job for computation.

Parameters:
job - The IHWMJob instance representing the job to be processed.
Returns:
A String representing the job ID.
Throws:
java.lang.Exception

CreateJobInstance

IHWMJob CreateJobInstance()
                          throws java.lang.Exception
This method creates an instance of IHWMJob without a GUI This mode is primarily used for creating a default job in to which different parameters can be set through APIs available in IHWMJob.

Returns:
An default instance of IHWMJob.
Throws:
java.lang.Exception

CreateJobInstanceWithDialog

IHWMJob CreateJobInstanceWithDialog()
                                    throws java.lang.Exception
This method creates an instance of IHWMJob with parameters set in a GUI dialog. This mode is used when job parametes have to be set interactively.

Returns:
An instance of IHWMJob populated with parameters filled in the dialog.
Throws:
java.lang.Exception

GetJobInstance

IHWMJob GetJobInstance(java.lang.String strJobID)
                       throws java.lang.Exception
This method returns the IHWMJob instance held by IHWMJobManager against the specified JobID. Returns null if none found.

Parameters:
strJobID - The JobID corresponding to which the IHWMJob instance is required.
Returns:
The IHWMJob instance for the specified JobID.
Throws:
java.lang.Exception

AddJobListener

void AddJobListener(IHWMJobListener listener,
                    IHWMJob hwmJob)
This method adds the specified listener in order to get call back events from the specified job.

Parameters:
listener - The listener to be added.
hwmJob - The job instance whose event call backs have to be listened for.

RemoveListener

void RemoveListener(IHWMJobListener listener,
                    IHWMJob hwmJob)
This method removes the specified listener in order to stop getting call back events from the specified job.

Parameters:
listener - The listener to be removed.
hwmJob - The job instance whose event call backs have to be stopped being listened for.

DownloadResults

void DownloadResults(java.lang.String strJobID,
                     java.io.File fileDestDir)
                     throws java.lang.Exception
This method downloads the result files for the job identified by the specified JobID to the specified directory.

Parameters:
strJobID - The JOBID to identify the job whose results have to be retrieved.
fileDestDir - The destination directory to retrieve files.
Throws:
java.lang.Exception

GetJobStatus

IHWMJobStatus GetJobStatus(IHWMJob hwmJob)
                           throws java.lang.Exception
This method returns the status of the specified job as an instance of IHWMJobStatus. It is to be noted that this method queries the job submission system to get the job status.

Parameters:
hwmJob - The IHWMJob instance whose status is required.
Returns:
An IHWMJobStatus instance representing the status of the job specified.
Throws:
java.lang.Exception

GetJobStatus

IHWMJobStatus GetJobStatus(java.lang.String strJobStatus)
                           throws java.lang.Exception
This is a utility method to convert a String strJobStatus in to an instance of IHWMJobStatus. It is to be noted that IHWMJobStatus does provide a toString() method so that an IHWMJobStatus instance can be obtained from a string and vice-versa.

Parameters:
strJobStatus - A string representation of the jobstatus.
Returns:
An instance of IHWMJobStatus if strJobStatus is in proper format and null otherwise.
Throws:
java.lang.Exception