Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.4.29
|
Leadtools.JobProcessor.Job Namespace > JobBase Class : OnJobReceived Method |
public abstract void OnJobReceived( string id, string userToken, string jobMetadata, string jobType, int progressRate )
'Declaration Public MustOverride Sub OnJobReceived( _ ByVal id As String, _ ByVal userToken As String, _ ByVal jobMetadata As String, _ ByVal jobType As String, _ ByVal progressRate As Integer _ )
'Usage Dim instance As JobBase Dim id As String Dim userToken As String Dim jobMetadata As String Dim jobType As String Dim progressRate As Integer instance.OnJobReceived(id, userToken, jobMetadata, jobType, progressRate)
public: abstract void OnJobReceived( String^ id, String^ userToken, String^ jobMetadata, String^ jobType, int progressRate )
When Creating a Job Processor worker, your custom assembly will be loaded to process the job. When loaded, the OnJobReceived Method will be called to notify your assembly a new job is ready to be processed. Your implementation of the OnJobReceived Method should block until job processing is complete. For more information on creating Job Processor workers, refer to Creating Job Processor Worker Assemblies.
Post the progress of the current job using the UpdatePercentage Method. Failure to post progress can cause the windows service to assume the process is hung and the windows service will terminate the process. Progress should be posted at the interval specified by the progressRate parameter.
For more information on how the userToken, jobMetadata, and jobType properties are used, refer to Understanding The LEADTOOLS Job Processor Database.