|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.pj.job.Job
public class Job
Class Job encapsulates a job and its attributes. A job is typically created by a JobGenerator. The job's attributes are:
| Constructor Summary | |
|---|---|
Job()
Construct a new uninitialized job. |
|
Job(int theJobNumber,
String theDescription,
String theMainClassName)
Construct a new job. |
|
| Method Summary | |
|---|---|
void |
addArgument(String arg)
Add the given argument string to this job. |
String |
getDescription()
Returns this job's description. |
int |
getJobNumber()
Returns this job's number. |
void |
readExternal(ObjectInput in)
Read this job from the given object input stream. |
void |
run()
Run this job. |
void |
stderrAppendToFile(File file)
Append this job's standard error to the end of the given file. |
void |
stderrToFile(File file)
Store this job's standard error in the given file. |
void |
stderrToStdout()
Redirect this job's standard error to the same place as this job's standard output. |
void |
stdinFromFile(File file)
Read this job's standard input from the given file. |
void |
stdoutAppendToFile(File file)
Append this job's standard output to the end of the given file. |
void |
stdoutToFile(File file)
Store this job's standard output in the given file. |
void |
writeExternal(ObjectOutput out)
Write this job to the given object output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Job()
public Job(int theJobNumber,
String theDescription,
String theMainClassName)
theJobNumber - Job number.theDescription - Job description.theMainClassName - Fully qualified name of main class.
NullPointerException - (unchecked exception) Thrown if theMainClassName is null.| Method Detail |
|---|
public int getJobNumber()
public String getDescription()
public void addArgument(String arg)
arg - Argument string.
NullPointerException - (unchecked exception) Thrown if arg is null.public void stdinFromFile(File file)
file - File.
NullPointerException - (unchecked exception) Thrown if file is null.public void stdoutToFile(File file)
file - File.
NullPointerException - (unchecked exception) Thrown if file is null.public void stdoutAppendToFile(File file)
file - File.
NullPointerException - (unchecked exception) Thrown if file is null.public void stderrToFile(File file)
file - File.
NullPointerException - (unchecked exception) Thrown if file is null.public void stderrAppendToFile(File file)
file - File.
NullPointerException - (unchecked exception) Thrown if file is null.public void stderrToStdout()
public void run()
If an I/O error occurs during Step 1, a RuntimeException wrapping an IOException is thrown. If any exception is thrown during Steps 2 through 4, an exception stack trace is printed on the per-thread standard error (which may have been redirected), but the exception is not propagated.
run in interface Runnable
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface Externalizableout - Object output stream.
IOException - Thrown if an I/O error occurred.
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface Externalizablein - Object input stream.
IOException - Thrown if an I/O error occurred.
ClassNotFoundException - Thrown if an object's class could not be found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||