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

java.lang.Object
  extended by java.lang.Thread
      extended by com.altair.hwm.comm.loadsubmission.ecompute.HWMEComputeJobStatusTracker
All Implemented Interfaces:
java.lang.Runnable

public class HWMEComputeJobStatusTracker
extends java.lang.Thread

Title:

Description:

Company: Altair Engineering, Inc.

unascribed


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
HWMEComputeJobStatusTracker(HWMEComputeJobPoller poller, HWMEComputeComm comm)
          Constructor
 
Method Summary
 void AddJob(int nJobID, javax.xml.soap.SOAPMessage soapMsg)
          Add a job to the list of jobs
 boolean IsThreadRunning()
          IsThreadRunning - checks if the thread has been stopped
 void RemoveJobByID(int nJobID)
          Remove the SOAP message for the given job id.
 void ResetRunFlag()
          ResetRunFlag - if the thread was stopped , reset the run flag so that the thread.start method will be executed
 void run()
          The run method called when the thread is started.
 void StopExecution()
          Stop the execution of the thread so that it will stop polling for results
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HWMEComputeJobStatusTracker

public HWMEComputeJobStatusTracker(HWMEComputeJobPoller poller,
                                   HWMEComputeComm comm)
Constructor

Parameters:
hwmEComputeComm - The eCompute communication class.
Method Detail

StopExecution

public void StopExecution()
Stop the execution of the thread so that it will stop polling for results


IsThreadRunning

public boolean IsThreadRunning()
IsThreadRunning - checks if the thread has been stopped

Returns:
- true if running , false if stopped

ResetRunFlag

public void ResetRunFlag()
ResetRunFlag - if the thread was stopped , reset the run flag so that the thread.start method will be executed


AddJob

public void AddJob(int nJobID,
                   javax.xml.soap.SOAPMessage soapMsg)
Add a job to the list of jobs

Parameters:
nJobID - The job id which should be polled for completion
SOAPMessage - The soap message for getting job status.

RemoveJobByID

public void RemoveJobByID(int nJobID)
Remove the SOAP message for the given job id.

Parameters:
nJobID - The job id whose info is to be removed.

run

public void run()
The run method called when the thread is started. Here we shall ask ecompute if the job is ready and if so - we shall fire an event.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread