com.ibm.tspaces.examples.services
Class WorkerTest

java.lang.Object
  |
  +--com.ibm.tspaces.examples.services.WorkerTest

public class WorkerTest
extends java.lang.Object
implements java.lang.Runnable, java.io.Serializable

This class implements a TupleSpace worker that will take a Runnable object fro a space and run it.

This class is inspired by the book MirrorWorld by David Gerlernter. This implements his idea of clients that will grab tuples that contain eval() functions, run the procedure indicated by the eval() and then return the answer to the tuplespace.

Author:
John Thomas
See Also:
Tuple, Field, TupleSpace, Serialized Form

Constructor Summary
WorkerTest(java.lang.String host, java.lang.String name)
          Create a Worker.
 
Method Summary
static void main(java.lang.String[] argv)
          The starting point of execution for the WorkerTest
 void run()
          The starting point of execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkerTest

public WorkerTest(java.lang.String host,
                  java.lang.String name)
Create a Worker.
Parameters:
ts - the TupleSpace where the values to be sorted are stored.
i - the index of the thread.
See Also:
TupleSpace
Method Detail

run

public void run()
The starting point of execution.
Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] argv)
The starting point of execution for the WorkerTest