The Factory Method of Batch Jobs
Define an interface for creating a batch job, letting subclasses decide which job to instantiate.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Factory Method
ARCANUM SCHOOL: Conjuration // Orchestration
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
/* ooRexx Factory Method */
::class JobScheduler
::method schedule
job = self~createJob()
job~submit()
::method createJob abstract
::class NightlyScheduler subclass JobScheduler
::method createJob
return .BackupJob~new()
::class BackupJob
::method submit
say "Submitting Backup Job to JES..."
The Factory Method defers the exact manifestation of a job into the queue until the scheduler invokes the true class of the task.
Runic Tags:
#factory-method
#scheduling
#rexx