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

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

public class HWMEComputeJobPoller
extends java.lang.Thread

Title: HWMEComputeJobPoller Description: A static object instantiated by HWMEComputeJobManager to perform E-Compute job polling. Maintains a reference to HWMEComputeComm to create SOAP Messages. Instantiates or uses the HWMEComputeJobStatusTracker thread , that pings E-Compute and checks for job status at fixed intervals. Has a vector of job listeners (run entities implement IHWMJobListener) that receive notifications once the FireOnJobCompleted is called. Company: Altair Engineering, Inc.


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
HWMEComputeJobPoller(HWMEComputeComm comm)
          HWMEComputeJobPoller - Constructor
 
Method Summary
 void AddJobListener(IHWMJobListener ihwmJobCompListener)
          AddJobListener Add a listener for receiving events when job is completed.
 void FireOnJobCompleted(int nJobID, int nJobStatus)
          Fire the Job Completed job result event Shows up a message dialog if the job failed in E-Compute
 void PollForCompletion(int nJobID)
          PollForCompletion This method will start a thread that will poll for the job to be completed and once completed, an event is fired to let all the listeners (i.e Run Entities) know that the results are available for downloading.
 void RemoveJobListener(IHWMJobListener ihwmJobCompListener)
          RemoveJobListener Remove the listener for receiving events when job is completed Presently this is not used as we do not want to remove listeners.
 void StopPolling()
          StopPolling - stop the polling (job status tracker ) thread
 
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, run, 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

HWMEComputeJobPoller

public HWMEComputeJobPoller(HWMEComputeComm comm)
HWMEComputeJobPoller - Constructor

Parameters:
comm -
Method Detail

AddJobListener

public void AddJobListener(IHWMJobListener ihwmJobCompListener)
AddJobListener Add a listener for receiving events when job is completed. Called by TCL Client to add a run entity as the listener.

Parameters:
ihwmJobCompListener - The listener for job completion events

RemoveJobListener

public void RemoveJobListener(IHWMJobListener ihwmJobCompListener)
RemoveJobListener Remove the listener for receiving events when job is completed Presently this is not used as we do not want to remove listeners.

Parameters:
ihwmJobCompListener - The listener for job completion events

FireOnJobCompleted

public void FireOnJobCompleted(int nJobID,
                               int nJobStatus)
Fire the Job Completed job result event Shows up a message dialog if the job failed in E-Compute

Parameters:
nJobID - The job id result information
nJobStatus - The status of the job

PollForCompletion

public void PollForCompletion(int nJobID)
                       throws java.lang.Exception
PollForCompletion This method will start a thread that will poll for the job to be completed and once completed, an event is fired to let all the listeners (i.e Run Entities) know that the results are available for downloading.

Parameters:
nJobID - The result of job to download.
Throws:
java.lang.Exception

StopPolling

public void StopPolling()
StopPolling - stop the polling (job status tracker ) thread