edu.rit.pj.job.test
Class Test01

java.lang.Object
  extended by edu.rit.pj.job.JobGenerator
      extended by edu.rit.pj.job.test.Test01
All Implemented Interfaces:
Iterable<Job>

public class Test01
extends JobGenerator

Class Test01 is a JobGenerator for unit testing. Each job, when run, sleeps for one second, then prints its job number and a message on the standard output. The standard output is redirected to a file named "outi", where i is the job number.


Constructor Summary
Test01(int N)
          Construct a new test job generator.
 
Method Summary
protected  Job createJob(int theJobNumber)
          Create the job with the given job number.
protected  int jobCount()
          Returns the number of jobs in the job group, N.
static void main(String[] args)
          Test01 job main program.
 
Methods inherited from class edu.rit.pj.job.JobGenerator
iterator, omit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Test01

public Test01(int N)
Construct a new test job generator.

Parameters:
N - Number of jobs.
Method Detail

jobCount

protected int jobCount()
Returns the number of jobs in the job group, N.

Specified by:
jobCount in class JobGenerator
Returns:
Number of jobs.

createJob

protected Job createJob(int theJobNumber)
Create the job with the given job number. This method must create and return an instance of class Job whose job number is theJobNumber.

Specified by:
createJob in class JobGenerator
Parameters:
theJobNumber - Job number (0 .. N−1).

main

public static void main(String[] args)
                 throws Exception
Test01 job main program. It simply prints its arguments on the standard output.

Throws:
Exception


Copyright © 2005-2012 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.