Implementing a direct Grid access service job

Implementing a new service job in g-Eclipse is quite easy. Providers have to implement abstract methods of eu.geclipse.servicejob.model.access.GridAccessServiceJob. This abstract class covers most common use cases and handles the integration of service job's model classes into Service Job Framework. The methods essential for ensuring proper functionality of newly developed services are described in this section. Before proceeding to interfaces' description below, please make sure that you are familiar with the common flow of processing service jobs in framework:

Interfaces and abstract implementations

eu.geclipse.core.model.IServiceJob
This is the basic interface for all service implementations in service job framework. However, developers of the service job should use abstract implementation described below.

eu.geclipse.servicejob.model.access.GridAccessServiceJob
This class was introduced to provide distinguish from submittable service jobs and in fact it doesn't add any interfaces or implementation to base abstract class for all service jobs, i.e. eu.geclipse.servicejob.model.AbstractServiceJob.
The abstract implementation's role is to integrate providers' implementations of service jobs into common Framework's model. This is done with usage of additional information, specific for different extensions and those information is accessed through abstract methods that are left for developers to implement.

Abstract methods

See also eu.geclipse.servicejob.model.AbstractServiceJob and eu.geclipse.servicejob.model.access.GridAccessServiceJob abstract classes for documentation.

public void init()
This method is invoked when service job is created. If the service job requires to run some piece of code, this is a good place to perform that operation.
public String getServiceJobDescription()
Method returns short, user-friendly description of this service job.
public List getSingleServiceJobNames()
Service Job may consist of many single service jobs. This method should return their names in human-readable form.
public void run()
This is method called by framework when service job is run. All processing essential for service should be performed here.
public InputStream getInputStreamForResult( IServiceJobResult result )
This method should return input stream for more detailed results of single IServiceJobResult object. InputStream will be used to prepare content that will be show in appropriate editor/viewer.

Exemplary implementations

Certificate lifetime check

This service job is used to check if host's certificate is still valid. For the same host machine different services may be tested (distinguished by port numbers).

eu.geclipse.servicejob.impl.cert.model.CertGridTest
Class extending GridAccessServiceJob - model implementation of service.
eu.geclipse.servicejob.impl.cert.model.parsers.CertResultsParser
Parser dedicated to parsing data specific for certificates test service job. It is used to put results to file and to parse them back, e.g. for use of getInputStreamForResult( IServiceJobResult result ) method.
eu.geclipse.servicejob.impl.cert.ui.CertTestWizardNode
Implementation of eu.geclipse.servicejob.ui.wizard.AbstractServiceJobWizardNode, adding certificates test's wizard pages to service job wizard. Please consult Service job UI part contribution section for details.