org.apache.oodt.cas.workflow.engine
Class NonBlockingIterativeWorkflowProcessorThread

java.lang.Object
  extended by org.apache.oodt.cas.workflow.engine.NonBlockingIterativeWorkflowProcessorThread
All Implemented Interfaces:
Runnable, WorkflowProcessorThread, CoreMetKeys, WorkflowStatus

public class NonBlockingIterativeWorkflowProcessorThread
extends Object
implements WorkflowProcessorThread, WorkflowStatus, CoreMetKeys

Version:
$Revision$

An instance of the WorkflowProcessorThread that works with the non-blocking thread pool engine.

Author:
woollard

Field Summary
 
Fields inherited from interface org.apache.oodt.cas.workflow.structs.WorkflowStatus
CREATED, ERROR, FINISHED, METADATA_MISSING, PAUSED, QUEUED, RESMGR_SUBMIT, STARTED
 
Fields inherited from interface org.apache.oodt.cas.workflow.metadata.CoreMetKeys
JOB_ID, PROCESSING_NODE, QUEUE_NAME, TASK_ID, WORKFLOW_INST_ID, WORKFLOW_MANAGER_URL
 
Constructor Summary
NonBlockingIterativeWorkflowProcessorThread(WorkflowInstance wInst, WorkflowInstanceRepository instRep, URL wParentUrl)
           
 
Method Summary
 String getCurrentTaskId()
           
 WorkflowInstanceRepository getInstanceRepository()
           
 org.apache.oodt.cas.resource.system.XmlRpcResourceManagerClient getRClient()
           
 URL getWmgrParentUrl()
           
 WorkflowInstance getWorkflowInstance()
           
 boolean isPaused()
           
 boolean isStopped()
           
 void pause()
           Pauses exectuion of a WorkflowInstace being handled by this WorkflowProcessorThread.
 void resume()
           Resumes execution of a WorkflowProcessorThread.pause()d WorkflowInstace by this WorkflowProcessorThread.
 void run()
           
 void setInstanceRepository(WorkflowInstanceRepository instRep)
           
 void setRClient(org.apache.oodt.cas.resource.system.XmlRpcResourceManagerClient client)
           
 void setWmgrParentUrl(URL wmgrParentUrl)
           
 void setWorkflowInst(WorkflowInstance workflowInst)
           
 void stop()
           Stops once and for all the thread from processing the workflow.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonBlockingIterativeWorkflowProcessorThread

public NonBlockingIterativeWorkflowProcessorThread(WorkflowInstance wInst,
                                                   WorkflowInstanceRepository instRep,
                                                   URL wParentUrl)
Method Detail

run

public void run()
Specified by:
run in interface Runnable

getWorkflowInstance

public WorkflowInstance getWorkflowInstance()
Specified by:
getWorkflowInstance in interface WorkflowProcessorThread
Returns:
The WorkflowInstance that this Thread is processing.

stop

public void stop()
Description copied from interface: WorkflowProcessorThread

Stops once and for all the thread from processing the workflow. This method should not maintain the state of the workflow, it should gracefully shut down the WorkflowProcessorThread and any of its subsequent resources.

Specified by:
stop in interface WorkflowProcessorThread

resume

public void resume()
Description copied from interface: WorkflowProcessorThread

Resumes execution of a WorkflowProcessorThread.pause()d WorkflowInstace by this WorkflowProcessorThread.

Specified by:
resume in interface WorkflowProcessorThread

pause

public void pause()
Description copied from interface: WorkflowProcessorThread

Pauses exectuion of a WorkflowInstace being handled by this WorkflowProcessorThread.

Specified by:
pause in interface WorkflowProcessorThread

isPaused

public boolean isPaused()
Returns:
True if the WorkflowInstance managed by this processor is paused.

isStopped

public boolean isStopped()

getCurrentTaskId

public String getCurrentTaskId()
Returns:
Returns the fCurrentTaskId.

setWorkflowInst

public void setWorkflowInst(WorkflowInstance workflowInst)
Parameters:
workflowInst - The fWorkflowInst to set.

getInstanceRepository

public WorkflowInstanceRepository getInstanceRepository()
Returns:
the instRep

setInstanceRepository

public void setInstanceRepository(WorkflowInstanceRepository instRep)
Parameters:
instRep - the instRep to set

getRClient

public org.apache.oodt.cas.resource.system.XmlRpcResourceManagerClient getRClient()
Returns:
the rClient

setRClient

public void setRClient(org.apache.oodt.cas.resource.system.XmlRpcResourceManagerClient client)
Parameters:
client - the rClient to set

getWmgrParentUrl

public URL getWmgrParentUrl()
Returns:
the wmgrParentUrl

setWmgrParentUrl

public void setWmgrParentUrl(URL wmgrParentUrl)
Parameters:
wmgrParentUrl - the wmgrParentUrl to set


Copyright © 1999-2011 Apache OODT. All Rights Reserved.