Aia.ITP.Server.Job class

The class Aia.ITP.Server.Job represents a job submission to KCM Core. It contains all functionality required to:

  • Submit jobs to KCM Core
  • Upload and download files to KCM Core
  • Exchange data values with KCM Core
  • Receive progress messages from KCM Core

An example of the usage is provided here.

Aia.ITP.Server.Job job;
job = new Aia.ITP.Server.Job("localhost",
                             "3001",
                             "MyJob_" + Guid.NewGuid().ToString(),
                             "MyService",
                             "FirstParameter",
                             "SecondParameter");
try
{
    job.Submit();
}
catch (Exception e)
{
	MessageBox.Show ("Error", "An error occurred in an ITP/Server job: " + e.Message);
}

This example creates an Aia.ITP.Server.Job object in order to call the KCM Core Service "MyService" with the parameters FirstParameter and SecondParameter. The job submission is destined for the KCM Core running on computer "localhost" (the local computer) on port 3001, with a randomly generated unique job ID based on a GUID (Globally Unique ID).

The class Aia.ITP.Server.Job exposes the following methods:

  • Job (String host, String port, String jobID, String Service, String parameters) (constructor)
  • Submit ()
  • SubmitAsync ()

For more information on these methods, see Job method, Submit () method, and SubmitAsync () method, respectively.