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



Top Method Summary
Options Name Purpose
# CHARACTER FindExecutable () Finds the UI Environment for the current background job
# CHARACTER GetDatabaseParameter () Builds the database startup parameter
# 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
+ 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
+ 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 Gets and sets if the Control should be added to the Job Monitor
+ LOGICAL AllowClose Get's and set's if this job may get killed without user intervention when the application is left
+ Consultingwerk.Framework.Collections.CharacterList Databases Get's and sets the comma delimited list of database names
+ CHARACTER JobId Returns an unique ID for this Job
+ CHARACTER JobParameter Gets and sets additional parameters for the -param startup parameter
+ CHARACTER JobTitle Gets and sets the Job title
+ LONGCHAR OutputData Returns the Output Data of the Process
+ CHARACTER Parameter Gets and sets additional session parameter
+ CHARACTER ProcedureName Gets and sets the name of the procedure executed by this background job
+ LOGICAL SendQuit Gets and sets if the backgorund Job should receive a "QUIT" message via ZeroMQ before killing it
+ Consultingwerk.UiEnvironmentEnum UiEnvironment Gets and sets the UI Environment of the background job


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 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 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 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

Purpose: Gets and sets if the Control should be added to the Job Monitor
Notes:

Returns LOGICAL
Top

PUBLIC LOGICAL AllowClose

Purpose: Get's and set's if this job may get killed without user intervention
when the application is left
Notes: Default is TRUE

Returns LOGICAL
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterList Databases

Purpose: Get's and sets the comma delimited list of database names
Notes:

Returns Consultingwerk.Framework.Collections.CharacterList
Top

PUBLIC CHARACTER JobId

Purpose: Returns an unique ID for this Job
Notes:

Returns CHARACTER
Top

PUBLIC CHARACTER JobParameter

Purpose: Gets and sets additional parameters for the -param startup parameter
Notes: When using this value in the background job, be aware, that the
first two entries delimited by pipe are reserved for the messaging
(e.g. ZeroMQ)

Returns CHARACTER
Top

PUBLIC CHARACTER JobTitle

Purpose: Gets and sets the Job title
Notes:

Returns CHARACTER
Top

PUBLIC LONGCHAR OutputData

Purpose: Returns the Output Data of the Process
Notes:

Returns LONGCHAR
Top

PUBLIC CHARACTER Parameter

Purpose: Gets and sets additional session parameter
Notes: You are not supposed to pass in the -param parameter using this
property. When your Job requires the -param parameter, please set
the value to the JobParameter properties. Additional info there

Returns CHARACTER
Top

PUBLIC CHARACTER ProcedureName

Purpose: Gets and sets the name of the procedure executed by this background job
Notes:

Returns CHARACTER
Top

PUBLIC LOGICAL SendQuit

Purpose: Gets and sets if the backgorund Job should receive a "QUIT" message
via ZeroMQ before killing it
Notes:

Returns LOGICAL
Top

PUBLIC Consultingwerk.UiEnvironmentEnum UiEnvironment

Purpose: Gets and sets the UI Environment of the background job
Notes:

Returns Consultingwerk.UiEnvironmentEnum


©2006-2016 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       26.08.2016 08:47:43