Namespace: Consultingwerk.Windows.BackgroundOperation
Class 
BackgroundJob Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:BackgroundJob
Purpose:Shell for executing Progress AVM's as background jobs
from an interactive session
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Tue Oct 30 22:35:24 CET 2012
Notes:Supports custom log entry type "BackgroundJob" with
logging levels of Basic, Verbose and Extended



Top Method Summary
Options Name Purpose
# CHARACTER FindExecutable () Finds the UI Environment for the current background job
# CHARACTER GetDatabaseParameter () Builds the database startup parameter
# OnProcessError (ProcessErrorEventArgs) Raises the ProcessError event
# OnProcessFinished (EventArgs) Raises the ProcessFinished
# OnProcessOutputChanged (EventArgs) Raises the ProcessOutputChanged
- ProcessDataAvailableHandler (Object, EventArgs) Event handler for the DataAvailable event of the Consultingwerk.Support.ProcessOutputReader control instance
# ProcessExitedHandler (Object, EventArgs) Event handler for the Exited event of the Process
+ SendMessage (character) Sends a message to the background job session using ZeroMq
+ Start (Control) Starts the background job
+ Stop () Stops the background job

Top Constructor Summary
Options Name Purpose
+ BackgroundJob (character) Constructor for the BackGroundJob class

Top Event Summary
Options Name Purpose
+ ProcessError (Object, ProcessErrorEventArgs) Raised when the ProcessError exists with an error code
+ ProcessFinished (Object, EventArgs) Raised when the background job has finished
+ ProcessOutputChanged (Object, EventArgs) Raised when the background job has (partial) data available

Top Property Summary
Options Name Purpose
+ LOGICAL AddToJobMonitor
+ LOGICAL AllowClose
+ Consultingwerk.Framework.Collections.CharacterList Databases
+ INTEGER ExitCode
+ LOGICAL Finished
+ LOGICAL InitializeMessageQueue
+ CHARACTER JobId
+ CHARACTER JobParameter
+ CHARACTER JobTitle
+ LONGCHAR OutputData
+ CHARACTER Parameter
+ CHARACTER ProcedureName
+ LOGICAL SendQuit
+ Consultingwerk.UiEnvironmentEnum UiEnvironment


Method Detail
Top

PROTECTED CHARACTER FindExecutable ()

Purpose: Finds the UI Environment for the current background job
Notes:

Returns CHARACTER
The executable name for the UI environment
Top

PROTECTED CHARACTER GetDatabaseParameter ()

Purpose: Builds the database startup parameter
Notes:

Returns CHARACTER
The startup parameters for the database connections
Top

PROTECTED OnProcessError (ProcessErrorEventArgs)

Purpose: Raises the ProcessError event
Notes:

Parameters:
e Consultingwerk.Windows.BackgroundOperation.ProcessErrorEventArgs
The Consultingwerk.EventArgs with the data for the event
Top

PROTECTED OnProcessFinished (EventArgs)

Purpose: Raises the ProcessFinished
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for the event
Top

PROTECTED OnProcessOutputChanged (EventArgs)

Purpose: Raises the ProcessOutputChanged
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for the event
Top

PRIVATE ProcessDataAvailableHandler (Object, EventArgs)

Purpose: Event handler for the DataAvailable event of the
Consultingwerk.Support.ProcessOutputReader control instance
Notes: Raises the ProcessOutputChanged event of the BackgroundJob instance

Parameters:
sender System.Object
The reference to the object that raised the event
e System.EventArgs
The default System.EventArgs with the data for this event
Top

PROTECTED ProcessExitedHandler (Object, EventArgs)

Purpose: Event handler for the Exited event of the Process
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e System.EventArgs
The System.EventArgs with the data for this event
Top

PUBLIC SendMessage (character)

Purpose: Sends a message to the background job session using ZeroMq
Notes: Requires either SendQuit or InitializeMessageQueue to be set
to true

Parameters:
pcMessage CHARACTER
The message to be send to the background job
Top

PUBLIC Start (Control)

Purpose: Starts the background job
Notes: The data reader control needs to be added to a control container to
be able to handle asynchronous messages from the child process

Parameters:
poParentControl System.Windows.Forms.Control
The ControlContainer to add the DataReader Control to
Top

PUBLIC Stop ()

Purpose: Stops the background job
Notes:



Constructor Detail
Top

PUBLIC BackgroundJob (character)

Purpose: Constructor for the BackGroundJob class
Notes:

Parameters:
pcProcedureName CHARACTER
The procedure to execute in a background job


Event Detail
Top

PUBLIC ProcessError (Object, ProcessErrorEventArgs)

Purpose: Raised when the ProcessError exists with an error code
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the ProgressErrorChanged event
e Consultingwerk.Windows.BackgroundOperation.ProcessErrorEventArgs
The ProcessErrorEventArgs with the data for the event
Top

PUBLIC ProcessFinished (Object, EventArgs)

Purpose: Raised when the background job has finished
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the ProcessFinished event
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for the event
Top

PUBLIC ProcessOutputChanged (Object, EventArgs)

Purpose: Raised when the background job has (partial) data available
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the ProcessOutputChanged event
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for the event


Property Detail
Top

PUBLIC LOGICAL AddToJobMonitor


Returns LOGICAL
Top

PUBLIC LOGICAL AllowClose


Returns LOGICAL
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterList Databases


Returns Consultingwerk.Framework.Collections.CharacterList
Top

PUBLIC INTEGER ExitCode


Returns INTEGER
Top

PUBLIC LOGICAL Finished


Returns LOGICAL
Top

PUBLIC LOGICAL InitializeMessageQueue


Returns LOGICAL
Top

PUBLIC CHARACTER JobId


Returns CHARACTER
Top

PUBLIC CHARACTER JobParameter


Returns CHARACTER
Top

PUBLIC CHARACTER JobTitle


Returns CHARACTER
Top

PUBLIC LONGCHAR OutputData


Returns LONGCHAR
Top

PUBLIC CHARACTER Parameter


Returns CHARACTER
Top

PUBLIC CHARACTER ProcedureName


Returns CHARACTER
Top

PUBLIC LOGICAL SendQuit


Returns LOGICAL
Top

PUBLIC Consultingwerk.UiEnvironmentEnum UiEnvironment


Returns Consultingwerk.UiEnvironmentEnum


©2006-2020 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       04.02.2020 23:41:23