com.ibm.tspaces
Class TupleSpaceObservableThread

java.lang.Object
  |
  +--com.ibm.tspaces.TupleSpaceObservableThread

public class TupleSpaceObservableThread
extends java.lang.Object
implements java.lang.Runnable

This class implements the observable thread that queries a tuplespcae periodically.

Author:
Matthias Eichstaedt

Field Summary
static int DEFAULTPORT
          The default port number.
static java.lang.String DEFAULTSERVERNAME
          The default name of the server hosting the tuple space.
static java.lang.String DEFAULTSPACENAME
          The default name of the tuple space.
 
Constructor Summary
TupleSpaceObservableThread(TupleSpaceObservable tso, java.lang.String spaceName, java.lang.String serverName, int port, SuperTuple templateTuple)
          Constructs a new observable thread.
TupleSpaceObservableThread(TupleSpaceObservable tso, java.lang.String spaceName, java.lang.String serverName, SuperTuple templateTuple)
          Constructs a new observable thread.
TupleSpaceObservableThread(TupleSpaceObservable tso, java.lang.String spaceName, SuperTuple templateTuple)
          Constructs a new observable thread.
 
Method Summary
 void run()
          Query tuplespace periodically.
 void stop()
          Cause the thread to stop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULTSPACENAME

public static final java.lang.String DEFAULTSPACENAME
The default name of the tuple space.

DEFAULTSERVERNAME

public static final java.lang.String DEFAULTSERVERNAME
The default name of the server hosting the tuple space.

DEFAULTPORT

public static final int DEFAULTPORT
The default port number.
Constructor Detail

TupleSpaceObservableThread

public TupleSpaceObservableThread(TupleSpaceObservable tso,
                                  java.lang.String spaceName,
                                  SuperTuple templateTuple)
                           throws TupleSpaceException
Constructs a new observable thread.
Parameters:
spaceName - - name of the tuplespace
tupleClassName - - name of the tuple class
Throws:
TupleSpaceException -  

TupleSpaceObservableThread

public TupleSpaceObservableThread(TupleSpaceObservable tso,
                                  java.lang.String spaceName,
                                  java.lang.String serverName,
                                  SuperTuple templateTuple)
                           throws TupleSpaceException
Constructs a new observable thread.
Parameters:
spaceName - - name of the tuplespace
serverName - - name of the tuplespace server
tupleClassName - - name of the tuple class
Throws:
TupleSpaceException -  

TupleSpaceObservableThread

public TupleSpaceObservableThread(TupleSpaceObservable tso,
                                  java.lang.String spaceName,
                                  java.lang.String serverName,
                                  int port,
                                  SuperTuple templateTuple)
                           throws TupleSpaceException
Constructs a new observable thread.
Parameters:
spaceName - - name of the tuplespace
serverName - - name of the tuplespace server
port - - port number
tupleClassName - - name of the tuple class
Throws:
TupleSpaceException -  
Method Detail

stop

public void stop()
Cause the thread to stop.

run

public void run()
Query tuplespace periodically.
Specified by:
run in interface java.lang.Runnable