Rings
Version 0.3

threeD.raytracer.network
Class JobProducer

java.lang.Object
  extended bythreeD.raytracer.network.JobProducer

public class JobProducer
extends java.lang.Object

A JobProducer object is used to produce and send jobs to a network node.


Field Summary
static java.lang.String helpText
           
 
Constructor Summary
JobProducer(java.lang.String sceneURI, int w, int h, int ssw, int ssh, int jobSize, long jobId)
          Constructs a new JobProducer object.
 
Method Summary
static void main(java.lang.String[] args)
          Constructs a JobProducer object and uses it to produce and send jobs described by the command line arguments.
 void sendAllJobs()
          Sends all jobs to the server.
 void sendJobs(int total)
          Sends some jobs to the server.
 void setServer(java.lang.String host, int port)
          Sets the hostname and port of the server (network node) to send jobs to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helpText

public static final java.lang.String helpText
See Also:
Constant Field Values
Constructor Detail

JobProducer

public JobProducer(java.lang.String sceneURI,
                   int w,
                   int h,
                   int ssw,
                   int ssh,
                   int jobSize,
                   long jobId)
Constructs a new JobProducer object.

Parameters:
sceneURI - URI of XML scene file to render.
w - Width of image.
h - Height of image.
ssw - Supersample width.
ssh - Supersample height.
jobSize - Number of pixels to render per job.
jobId - Unique id to use for jobs.
Method Detail

main

public static void main(java.lang.String[] args)
Constructs a JobProducer object and uses it to produce and send jobs described by the command line arguments.

Parameters:
args - See field JobProducer.helpText.

sendJobs

public void sendJobs(int total)
              throws java.io.IOException
Sends some jobs to the server.

Parameters:
total - Number of jobs to send.
Throws:
java.io.IOException - If an IOException is thrown by NetworkClient.sendJob

sendAllJobs

public void sendAllJobs()
                 throws java.io.IOException
Sends all jobs to the server.

Throws:
java.io.IOException - If an IOException is thrown by NetworkClient.sendJob

setServer

public void setServer(java.lang.String host,
                      int port)
Sets the hostname and port of the server (network node) to send jobs to.

Parameters:
host - Hostname of server.
port - Port of server.

Rings
Version 0.3

Copyright 2003-05 Mike Murray