Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

sosc::Job Class Reference

Inheritance diagram for sosc::Job:

test::TestJobClass List of all members.

Public Methods

 Job ()
 Job (int id, String description, Map args1, Map args2)
int getId ()
final void addToJobQueue (String queue, String description, Map args1) throws Exception
void log (String text) throws Exception
abstract void execute () throws Exception

Private Attributes

String description = "No Description"
Map args1 = new HashMap()
Map args2 = new HashMap()
int id = 0

Detailed Description

All job classes must extend this class. This class should eventually become abstract. For now it is a concrete class to allow for some testing.

Definition at line 32 of file Job.java.


Constructor & Destructor Documentation

sosc::Job::Job   [inline]
 

Empty constructor used by callers who then want to call addToJobQuueue()

Definition at line 49 of file Job.java.

sosc::Job::Job int    id,
String    description,
Map    args1,
Map    args2
[inline]
 

Used by JobTool to instantiate the Job and run it. All Job subclasses must have a constructor with this signature. They must also guarantee that they call super().

Definition at line 56 of file Job.java.

References sosc::Job::args1, sosc::Job::args2, sosc::Job::description, and sosc::Job::id.


Member Function Documentation

final void sosc::Job::addToJobQueue String    queue,
String    description,
Map    args1
throws Exception [inline]
 

Causes this Job to add itself to the queue. Handy for making a job reschedule itself. Be wary of infinite job loops though. :)

Definition at line 75 of file Job.java.

References sosc::Job::args1, and sosc::Job::description.

abstract void sosc::Job::execute   throws Exception [pure virtual]
 

Job subclasses must implement this method.

Implemented in test::TestJobClass.

int sosc::Job::getId   [inline]
 

Returns the ID of this job.

Definition at line 66 of file Job.java.

References sosc::Job::id.

void sosc::Job::log String    text throws Exception [inline]
 

Makes a log entry in the job journal for this job. Ordinarily this would only be called by the job itself, but it is public incase the caller wants to make some post job log statements.

Definition at line 84 of file Job.java.

References sosc::Job::id.

Referenced by test::TestJobClass::execute().


Member Data Documentation

Map sosc::Job::args1 = new HashMap() [private]
 

Arguments

Definition at line 38 of file Job.java.

Referenced by sosc::Job::addToJobQueue(), and sosc::Job::Job().

Map sosc::Job::args2 = new HashMap() [private]
 

Arguments

Definition at line 41 of file Job.java.

Referenced by sosc::Job::Job().

String sosc::Job::description = "No Description" [private]
 

Description

Definition at line 35 of file Job.java.

Referenced by sosc::Job::addToJobQueue(), and sosc::Job::Job().

int sosc::Job::id = 0 [private]
 

The ID of this job (if invoked by the JobTool

Definition at line 44 of file Job.java.

Referenced by sosc::Job::getId(), sosc::Job::Job(), and sosc::Job::log().


The documentation for this class was generated from the following file:
Generated on Mon Jul 14 17:19:22 2003 for SOSC by doxygen1.2.15