factory, van Gogh

The job engine factory is a local service of the kernel. It creates job engines that are responsible for executing jobs.

Get the job engine factory

The factory is fetched as a singleton from the service registry:

final IJobEngineFactory factory = CServiceRegistry.getInstance()

As always, make sure that the service starter of your package has a dependency on the IJobEngineFactory to ensure that the factory already exists.

Creating a job engine

The job engine factory has a single method for generating job engines.

@NotNull IJobEngine createEngine(@NotNull String aName) throws CException;

A name for the engine is given, which can be found in the log output.

See also:

nyssr.net - Innovative Distributed System