All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.tspaces.TupleSpaceObservable
java.lang.Object
|
+----java.util.Observable
|
+----com.ibm.tspaces.TupleSpaceObservable
- public class TupleSpaceObservable
- extends Observable
This class implements the subject (or publisher) in the observer
pattern from the "Design Patterns" book. It defines a one-to-many
dependency between a TupleSpaceObservable and a number of TupleSpaceObservers.
When one TupleSpace changes its state, all its dependents are notified
and updated automatically.
- Author:
- Matthias Eichstaedt
-
TupleSpaceObservable(String, String, int, SuperTuple)
- Constructs a new observable for a particular tuple space.
-
TupleSpaceObservable(String, String, SuperTuple)
- Constructs a new observable for a particular tuple space.
-
TupleSpaceObservable(String, SuperTuple)
- Constructs a new observable for a particular tuple space.
-
dispose()
- Disposes this tuplespace publisher.
-
setChanged()
- Indicates that this object has changed.
TupleSpaceObservable
public TupleSpaceObservable(String spaceName,
SuperTuple templateTuple) throws TupleSpaceException
- Constructs a new observable for a particular tuple space.
- Parameters:
- spaceName - - name of the tuplespace
- templateTuple - - tuple template for the query
TupleSpaceObservable
public TupleSpaceObservable(String spaceName,
String serverName,
SuperTuple templateTuple) throws TupleSpaceException
- Constructs a new observable for a particular tuple space.
- Parameters:
- spaceName - - name of the tuplespace
- serverName - - name of the tuplespace server
- templateTuple - - tuple template for the query
TupleSpaceObservable
public TupleSpaceObservable(String spaceName,
String serverName,
int port,
SuperTuple templateTuple) throws TupleSpaceException
- Constructs a new observable for a particular tuple space.
- Parameters:
- spaceName - - name of the tuplespace
- serverName - - name of the tuplespace server
- port - - port number
- templateTuple - - tuple template for the query
dispose
public synchronized void dispose()
- Disposes this tuplespace publisher. Always invoke this method when
you need to get rid of a tuplespace publisher.
setChanged
protected void setChanged()
- Indicates that this object has changed.
- Overrides:
- setChanged in class Observable
All Packages Class Hierarchy This Package Previous Next Index