All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.tspaces.TupleSpace

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

public class TupleSpace
extends Object
A TupleSpace is a shared named collection (bag) of Tuples. The basic operations supported by the collection are to add a Tuple to the space (write), and to remove one from the space (take).

The collection is stored and administered across a network on one or more "Tuple Space Servers". Several threads on the same or different machines can be accessing the space simultaneously. Some will be adding tuples to the space and some removing them.

A client thread accesses the collection/space using the methods of an instance of this class. For each different Tuple Space a client wishes to access, it requires a separate instance of this class, even if they are managed by the same server. The details of how the operations are completed are hidden from the user. All they need is the name of the space, and the name of a server that manages that space.

The primitive operations supported by the space are:

Author:
Daniel Ford, Toby Lehman, Peter Wyckoff, Stephen McLaughry, John Thomas
See Also:
Field, Tuple, CallbackThread, TSIOHandler, Waiter, Semaphore

Variable Index

 o _ADMIN_TSNAME
the name of the admin tuple space.
 o _DEBUG
debug mode
 o _DEBUG_COMMUNICATION
 o _DEFAULT_DBTYPE
 o _DEFAULT_INDEX_FIELD
 o _DEFAULT_PASSWORD
 o _DEFAULT_PERSISTENCE
Whether a tuple space is persistent by default and its index -1 indicates no index and what type
 o _DEFAULT_USER
This is what is used if no user/password is specified
 o _echo
If true then print the progess of each operation on standard out.
 o _GALAXY_TSNAME
the galaxy tuple space name.
 o _isPersistent
is this tuple space persistent?
 o _password
The password for this space.
 o _TOP_GROUP
the default top group that everyone is a part of.
 o _tsName
The name of the tuple space.
 o _tsPort
The port for this space's server.
 o _tsServer
The name of the machine running the TupleSpace server
 o _userName
The username for this space.
 o _userNameAlreadyUsed
A flag to make sure we don't change the username after the connection has been verified.
 o _VERSION
Code Version.Level.Modification Change this when a new level of code is to be released
 o ABORT
The string used to signal an abort operation.
 o ADDFACTORY
 o ADDHANDLER
 o CMD_TUP
 o CONSUMINGSCAN
 o COUNT
 o DEFAULTCONNECTTRIES
the number of times to try to connect to the server before raising an exception to the caller.
 o DEFAULTHOST
The default name of the machine running the TupleSpace server.
 o DEFAULTNAME
The default name of a TupleSpace if one isn't specified.
 o DEFAULTPORT
The default port number used to connect to the TupleSpace server if a port number isn't specified (the usual case).
 o DELETE
 o DELETEALL
 o EVENT_ACTION_FLD
 o EVENT_COMMAND_FLD
the fields of an event tuple, keep with the making of the event templates until things stabilize pw.
 o EVENT_DEREGISTER
 o EVENT_EAT_FLD
 o EVENT_REGISTER
 o EVENT_SEQ_FLD
 o EVENT_TUPLE_FLD
 o EXCEPTION
The string used between the server and tspace library to signal a problem.
 o INDEXFIELD
 o OK
The string used between the server to signal good the operation completely normally.
 o PERSISTENCE
configuration field names.
 o READ
 o RHONDA
 o SCAN
Other commands
 o SCANALL
 o SEQ_NUM
obsolete public static final String _ADD_USER = "/ac/addUser"; public static final String _DEL_USER = "/ac/rmUser"; public static final String _ADD_GROUP = "/ac/addGroup"; public static final String _DEL_GROUP = "/ac/rmGroup"; public static final String _LIST_GROUPS = "/ac/loadGroupDB"; public static final String _LIST_USERS = "/ac/loadUserDB"; public static final String _LIST_A_GROUPS_USERS = "/ac/getuserMembers"; public static final String _LIST_A_USERS_GROUPS = "/ac/getSupergroups"; public static final String _ADD_USER_TO_GROUP = "/ac/addSupergroupToUser"; public static final String _DEL_USER_FROM_GROUP ="/ac/rmSupergroupFromUser";
 o SETCONFIGURATION
 o STATUS
 o TAKE
 o TS_ARG
 o TS_CMD
 o TS_NAME
 o TS_RETURN_VALUE
 o TS_STATUS_CODE
 o TSCREATE
 o TSDBTYPE
 o TSDESTROY
 o TSEXISTS
 o WAITTOREAD
 o WAITTOTAKE
 o WRITE

Constructor Index

 o TupleSpace()
Create a default tuple space.
 o TupleSpace(String)
Create a named Tuple Space.
 o TupleSpace(String, String)
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server.
 o TupleSpace(String, String, int)
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server.
 o TupleSpace(String, String, int, String, String)
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server.
 o TupleSpace(String, String, int, Tuple)
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server.
 o TupleSpace(String, String, int, Tuple, String, String)
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server.
 o TupleSpace(String, String, int, Tuple, Tuple)
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server.
 o TupleSpace(String, String, int, Tuple, Tuple, String, String)
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server.
 o TupleSpace(String, String, String)
Create a named Tuple Space.
 o TupleSpace(String, String, String, String)
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server.
 o TupleSpace(String, String, Tuple)
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server.
 o TupleSpace(String, String, Tuple, String, String)
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server.
 o TupleSpace(String, Tuple)
Create a named Tuple Space.
 o TupleSpace(String, Tuple, String, String)
Create a named Tuple Space.
 o TupleSpace(Tuple)
Create a default tuple space.

Method Index

 o addFactory(Class[])
NOT SUPPORTED ON THE SERVER IN VERSION 1.0.1 add a new factory to this tuple space as the topmost (most powerful) factory.
 o addHandler(String, Class[])
NOT SUPPORTED ON THE SERVER IN VERSION 1.0.1 Add a new handler to this tuple space.
 o cleanup()
this method is used to close the current connections to the server.
 o command(String, SuperTuple)
Issue a command to the TupleSpace and pass along a Tuple as an argument.
 o connectionTries(int)
Set the connectionTries to a new value.
 o connectionWaitTime(int)
Set the connectionWaitTime to a new value.
 o consumingScan(Serializable)
Retrieve and delete all Tuples from the space that match a Tuple template.
 o consumingScan(Serializable, Serializable)
Retrieve and delete all Tuples from the space that match a Tuple template.
 o consumingScan(Serializable, Serializable, Serializable)
Retrieve and delete all Tuples from the space that match a Tuple template.
 o consumingScan(SuperTuple)
Retrieve and delete all Tuples from the space that match a Tuple template.
 o count(SuperTuple)
Count all tuples from the space that match a Tuple template.
 o countN(SuperTuple)
Count all tuples from the space that match a Tuple template.
 o createTupleSpace(String, String, int, Tuple, Tuple)
create a tuple space A configuration tuple looks like: Tuple( new Field(TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1)), new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB))) Any of the fields can be left out and ordering doesn't matter. Deprecated.
 o createTupleSpace(String, Tuple, Tuple)
create a tuple space given a name for the space and configuration information in the configuration tuple. Deprecated.
 o delete(SuperTuple)
Delete all tuples that match this template.
 o deleteAll()
Delete all tuples in a space.
 o destroy()
 o eventRegister(String, SuperTuple, Callback)
Register for an event on the server.
 o eventTemplate(String, SuperTuple, Class)
 o exists()
 o getFactoryStack()
Return a scan of all the factory names for this tuple space and their level numbers --- level 0 is the highest --- most recently added --- factory.
 o getHandlerCommandNames(String)
Return a scan of all the handler names for this factory --- this feature is *NOT* supported for the built in commands --- TSFSmallTS handlers.
 o getName()
Return the space name.
 o getPort()
Return the number of the port.
 o getServer()
Return the name of the server.
 o getVersion()
Class Method to Return the TSpaces Code Version number.
 o in(Serializable)
Retrieve a tuple from the space that has one Field matching the Serializables. Deprecated.
 o in(Serializable, Serializable)
Retrieve a tuple from the space that has two Fields matching specified Serializables. Deprecated.
 o in(Serializable, Serializable, Serializable)
Retrieve a tuple from the space that has three Fields matching specified Serializables. Deprecated.
 o in(Tuple)
Retrieve a tuple from the space that matches a Tuple template. Deprecated.
 o inp(Serializable)
Retrieve a tuple from the space that has one Field matching the Serializables. Deprecated.
 o inp(Serializable, Serializable)
Retrieve a tuple from the space that has two Fields matching specified Serializables. Deprecated.
 o inp(SuperTuple)
Retrieve a tuple from the space that matches a Tuple template. Deprecated.
 o isValidTSName(String)
 o killConnection(String, Exception)
this method is used to close the current connection to the server.
 o main(String[])
Test routine.
 o makeJarFile(Class[])
For all the classes, if the class is in a jar file, grab the entire jar file otherwise for plain .class classes ship them in their own .jar file.
 o out(Serializable)
Add a Tuple to the Tuple Space that has a single field equal to the Object. Deprecated.
 o out(Serializable, Serializable)
Add a Tuple to the Tuple Space that has two fields equal to the Serializables passed in. Deprecated.
 o out(Serializable, Serializable, Serializable)
Add a Tuple to the Tuple Space that has two fields equal to the Serializables passed in. Deprecated.
 o out(Tuple)
Add the Tuple to the Tuple Space. Deprecated.
 o parseConfigTuple(String, SuperTuple)
 o read(Serializable)
Retrieve a Tuple from the space that matches the Tuple template.
 o read(Serializable, Serializable)
Retrieve a Tuple from the space that matches the Tuple template.
 o read(Serializable, Serializable, Serializable)
Retrieve a Tuple from the space that matches the Tuple template.
 o read(SubclassableTuple)
Retrieve a Tuple from the space that matches the Tuple template.
 o read(SuperTuple)
Retrieve a Tuple from the space that matches the Tuple template.
 o read(Tuple)
Retrieve a Tuple from the space that matches the Tuple template.
 o rhonda(Tuple, Tuple)
The rendevous primitive.
 o scan(Serializable)
Retrieve all Tuples from the space that match a Tuple template.
 o scan(Serializable, Serializable)
Retrieve all Tuples from the space that match a Tuple template.
 o scan(Serializable, Serializable, Serializable)
Retrieve all Tuples from the space that match a Tuple template.
 o scan(SuperTuple)
Retrieve all Tuples from the space that match a Tuple template.
 o setClosingDownByForcingFinalizers(boolean)
should the TupleSpace force finalizers to be run on exit? this method has some security checking on it, so when running in netscape this should be set to false.
 o setUserName(String, String)
Set username to be used for access control on this tuplespace
 o status(String, int)
 o take(Serializable)
Retrieve a Tuple from the space that has one Field matching the Serializables.
 o take(Serializable, Serializable)
Retrieve a tuple from the space that has two Fields matching specified Serializables.
 o take(Serializable, Serializable, Serializable)
Retrieve a tuple from the space that has three Fields matching specified Serializables.
 o take(SubclassableTuple)
Retrieve a tuple from the space that matches a Tuple template.
 o take(SuperTuple)
Retrieve a tuple from the space that matches a Tuple template.
 o take(Tuple)
Retrieve a tuple from the space that matches a Tuple template.
 o waitToRead(Serializable)
Retrieve a Tuple from the space that matches the Tuple template.
 o waitToRead(Serializable, Serializable)
Retrieve a Tuple from the space that matches the Tuple template.
 o waitToRead(Serializable, Serializable, Serializable)
Retrieve a Tuple from the space that matches the Tuple template.
 o waitToRead(SubclassableTuple)
Retrieve a Tuple from the space that matches the Tuple template.
 o waitToRead(SuperTuple)
Retrieve a Tuple from the space that matches the Tuple template.
 o waitToRead(Tuple)
Retrieve a Tuple from the space that matches the Tuple template.
 o waitToTake(Serializable)
Retrieve a tuple from the space that has one Field matching the Serializables.
 o waitToTake(Serializable, Serializable)
Retrieve a tuple from the space that has two Fields matching specified Serializables.
 o waitToTake(Serializable, Serializable, Serializable)
Retrieve a tuple from the space that has three Fields matching specified Serializables.
 o waitToTake(SubclassableTuple)
Retrieve a tuple from the space that matches a Tuple template.
 o waitToTake(SuperTuple)
Retrieve a tuple from the space that matches a Tuple template.
 o waitToTake(Tuple)
Retrieve a tuple from the space that matches a Tuple template.
 o write(Serializable)
Add a Tuple to the Tuple Space that has a single field equal to the Object.
 o write(Serializable, Serializable)
Add a Tuple to the Tuple Space that has two fields equal to the Objects passed in.
 o write(Serializable, Serializable, Serializable)
Add a Tuple to the Tuple Space that has two fields equal to the Serializables passed in.
 o write(SuperTuple)
Add the Tuple to the Tuple Space.

Variables

 o _VERSION
 public static final String _VERSION
Code Version.Level.Modification Change this when a new level of code is to be released

 o _DEFAULT_PERSISTENCE
 public static final boolean _DEFAULT_PERSISTENCE
Whether a tuple space is persistent by default and its index -1 indicates no index and what type

 o _DEFAULT_INDEX_FIELD
 public static final int _DEFAULT_INDEX_FIELD
 o _DEFAULT_DBTYPE
 public static final String _DEFAULT_DBTYPE
 o DEFAULTNAME
 public static final String DEFAULTNAME
The default name of a TupleSpace if one isn't specified.

 o DEFAULTPORT
 public static final int DEFAULTPORT
The default port number used to connect to the TupleSpace server if a port number isn't specified (the usual case).

 o DEFAULTHOST
 public static final String DEFAULTHOST
The default name of the machine running the TupleSpace server.

 o EXCEPTION
 public static final String EXCEPTION
The string used between the server and tspace library to signal a problem. Not normally referenced by a user.

 o OK
 public static final String OK
The string used between the server to signal good the operation completely normally. Not normally referenced by a user.

 o PERSISTENCE
 public static final String PERSISTENCE
configuration field names. Persitence can be true or false IndexField is for TSSmallDB, -1 indicates no index and is the default. TSDbType can be TSSmallDB.SMALL_DB or TSMMDB.MM_DB.

 o INDEXFIELD
 public static final String INDEXFIELD
 o TSDBTYPE
 public static final String TSDBTYPE
 o _GALAXY_TSNAME
 public static final String _GALAXY_TSNAME
the galaxy tuple space name. This used to be in TSServer, but it is here now as the client may want to make operations on the galaxy ts so need to know it here, but don't want to have any dependence on the Server code from the client. Maybe later can make some common file Also, don't want users to use this. Only the system should be using it!!!!

 o _ADMIN_TSNAME
 public static final String _ADMIN_TSNAME
the name of the admin tuple space. Here for the same reasons as the Galaxy name. users please don't use it.

 o WRITE
 public static final String WRITE
 o TAKE
 public static final String TAKE
 o READ
 public static final String READ
 o WAITTOTAKE
 public static final String WAITTOTAKE
 o WAITTOREAD
 public static final String WAITTOREAD
 o SCAN
 public static final String SCAN
Other commands

 o CONSUMINGSCAN
 public static final String CONSUMINGSCAN
 o SCANALL
 public static final String SCANALL
 o COUNT
 public static final String COUNT
 o DELETE
 public static final String DELETE
 o DELETEALL
 public static final String DELETEALL
 o TSEXISTS
 public static final String TSEXISTS
 o EVENT_REGISTER
 public static final String EVENT_REGISTER
 o EVENT_DEREGISTER
 public static final String EVENT_DEREGISTER
 o STATUS
 public static final String STATUS
 o ADDFACTORY
 public static final String ADDFACTORY
 o ADDHANDLER
 public static final String ADDHANDLER
 o SETCONFIGURATION
 public static final String SETCONFIGURATION
 o TSCREATE
 public static final String TSCREATE
 o TSDESTROY
 public static final String TSDESTROY
 o ABORT
 public static final String ABORT
The string used to signal an abort operation. For now only the server should be doing an abort as each operation is a transaction, but the server will not stop the client from using abort to reinsert a TAKE or WAITTOTAKE tuple back into tuple space.

 o RHONDA
 public static final String RHONDA
 o SEQ_NUM
 public static final int SEQ_NUM
obsolete public static final String _ADD_USER = "/ac/addUser"; public static final String _DEL_USER = "/ac/rmUser"; public static final String _ADD_GROUP = "/ac/addGroup"; public static final String _DEL_GROUP = "/ac/rmGroup"; public static final String _LIST_GROUPS = "/ac/loadGroupDB"; public static final String _LIST_USERS = "/ac/loadUserDB"; public static final String _LIST_A_GROUPS_USERS = "/ac/getuserMembers"; public static final String _LIST_A_USERS_GROUPS = "/ac/getSupergroups"; public static final String _ADD_USER_TO_GROUP = "/ac/addSupergroupToUser"; public static final String _DEL_USER_FROM_GROUP ="/ac/rmSupergroupFromUser";

 o CMD_TUP
 public static final int CMD_TUP
 o EVENT_COMMAND_FLD
 public static final int EVENT_COMMAND_FLD
the fields of an event tuple, keep with the making of the event templates until things stabilize pw. The 0th field is TupleSpace.ANEVENT

 o EVENT_TUPLE_FLD
 public static final int EVENT_TUPLE_FLD
 o EVENT_SEQ_FLD
 public static final int EVENT_SEQ_FLD
 o EVENT_ACTION_FLD
 public static final int EVENT_ACTION_FLD
 o EVENT_EAT_FLD
 public static final int EVENT_EAT_FLD
 o _DEFAULT_USER
 public static final String _DEFAULT_USER
This is what is used if no user/password is specified

 o _DEFAULT_PASSWORD
 public static final String _DEFAULT_PASSWORD
 o TS_NAME
 public static final int TS_NAME
 o TS_CMD
 public static final int TS_CMD
 o TS_ARG
 public static final int TS_ARG
 o TS_STATUS_CODE
 public static final int TS_STATUS_CODE
 o TS_RETURN_VALUE
 public static final int TS_RETURN_VALUE
 o _DEBUG
 public static boolean _DEBUG
debug mode

 o _DEBUG_COMMUNICATION
 public static boolean _DEBUG_COMMUNICATION
 o _echo
 protected static boolean _echo
If true then print the progess of each operation on standard out.

 o DEFAULTCONNECTTRIES
 protected static final int DEFAULTCONNECTTRIES
the number of times to try to connect to the server before raising an exception to the caller. Would probably be nice in the future if this was an instance variable rather than static.

 o _TOP_GROUP
 public static final String _TOP_GROUP
the default top group that everyone is a part of. Useful for basic ops which everyone should be able to do, like reading access permissions.

 o _isPersistent
 protected boolean _isPersistent
is this tuple space persistent?

 o _tsName
 protected String _tsName
The name of the tuple space.

 o _tsServer
 protected String _tsServer
The name of the machine running the TupleSpace server

 o _tsPort
 protected int _tsPort
The port for this space's server.

 o _userName
 protected String _userName
The username for this space.

 o _password
 protected String _password
The password for this space.

 o _userNameAlreadyUsed
 protected boolean _userNameAlreadyUsed
A flag to make sure we don't change the username after the connection has been verified.

Constructors

 o TupleSpace
 public TupleSpace() throws TupleSpaceException
Create a default tuple space. The server is assumed to be on the same host (localhost) and the name of the space is the deafult name ("foo"). Connections to the server will be made on the default port (8200).

Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
 o TupleSpace
 public TupleSpace(Tuple configuration_) throws TupleSpaceException
Create a default tuple space. The server is assumed to be on the same host (localhost) and the name of the space is the deafult name ("foo"). Connections to the server will be made on the default port (8200). create it with the specified configuration. A configuration tuple looks like: Tuple( new Field( TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1))) new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB)))

Parameters:
configuration_ - the tuple with configuration info in it
Throws: TupleSpaceException
if there is a problem setting up the configuration
 o TupleSpace
 public TupleSpace(String name_) throws TupleSpaceException
Create a named Tuple Space. The server is assumed to be on the same host (localhost). Connections to the server will be made on the default port (8200).

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
 o TupleSpace
 public TupleSpace(String name_,
                   String userName_,
                   String password_) throws TupleSpaceException
Create a named Tuple Space. The server is assumed to be on the same host (localhost). Connections to the server will be made on the default port (8200).

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
userName_ - the name of the user for this space
password_ - the password of the user
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
 o TupleSpace
 public TupleSpace(String name_,
                   Tuple configuration_) throws TupleSpaceException
Create a named Tuple Space. The server is assumed to be on the same host (localhost). Connections to the server will be made on the default port (8200). A configuration tuple looks like: Tuple( new Field( TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1))) new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB)))

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
configuation_ - the configuration tuple
Throws: TupleSpaceException
if there is a problem setting up the configuration
 o TupleSpace
 public TupleSpace(String name_,
                   Tuple configuration_,
                   String userName_,
                   String password_) throws TupleSpaceException
Create a named Tuple Space. The server is assumed to be on the same host (localhost). Connections to the server will be made on the default port (8200). A configuration tuple looks like: Tuple( new Field( TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1))) new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB)))

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
configuration_ - the configuration tuple
userName_ - the name of the user for this space
password_ - the password of the user
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
 o TupleSpace
 public TupleSpace(String name_,
                   String tsServer_) throws TupleSpaceException
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server. Connections to the server will be made on the default port (8200).

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
tsServer_ - A string that identifies the TupleSpaceServer that manages the TupleSpace.
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
 o TupleSpace
 public TupleSpace(String name_,
                   String tsServer_,
                   String userName_,
                   String password_) throws TupleSpaceException
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server. Connections to the server will be made on the default port (8200).

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
tsServer_ - A string that identifies the TupleSpaceServer that manages the TupleSpace.
userName_ - the user's tspaces user name
password_ - the user's password
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
 o TupleSpace
 public TupleSpace(String name_,
                   String tsServer_,
                   Tuple configuration_) throws TupleSpaceException
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server. Connections to the server will be made on the default port (8200). A configuration tuple looks like: Tuple( new Field( TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1))) new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB)))

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
tsServer_ - A string that identifies the TupleSpaceServer that manages the TupleSpace.
configuration_ - configuration tuple
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
 o TupleSpace
 public TupleSpace(String name_,
                   String tsServer_,
                   Tuple configuration_,
                   String userName_,
                   String password_) throws TupleSpaceException
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server. Connections to the server will be made on the default port (8200). A configuration tuple looks like: Tuple( new Field( TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1))) new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB)))

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
tsServer_ - A string that identifies the TupleSpaceServer that manages the TupleSpace.
configuration_ - configuration tuple
userName_ - the user's tspaces user name
password_ - the user's password
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
 o TupleSpace
 public TupleSpace(String name_,
                   String tsServer_,
                   int tsPort_) throws TupleSpaceException
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server. Connections to the server will be made on a specified port.

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
tsServer_ - A string that identifies the TupleSpaceServer that manages the TupleSpace.
tsPort_ - The specific port that the TupleSpaceServer uses to listen for connections from TupleSpace clients.
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
 o TupleSpace
 public TupleSpace(String name_,
                   String tsServer_,
                   int tsPort_,
                   String userName_,
                   String password_) throws TupleSpaceException
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server. Connections to the server will be made on a specified port.

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
tsServer_ - A string that identifies the TupleSpaceServer that manages the TupleSpace.
tsPort_ - The specific port that the TupleSpaceServer uses to listen for connections from TupleSpace clients.
userName_ - the user's tspaces user name
password_ - the user's password
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
 o TupleSpace
 public TupleSpace(String name_,
                   String tsServer_,
                   int tsPort_,
                   Tuple configuration_) throws TupleSpaceException
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server. Connections to the server will be made on a specified port.

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
tsServer_ - A string that identifies the TupleSpaceServer that manages the TupleSpace.
tsPort_ - The specific port that the TupleSpaceServer uses to listen for connections from TupleSpace clients.
configuration_ - the configuration tuple for this space
accessPermissions_ - the permissions for this space This constructor calls the constructor with no configuration and then does the configuration. The reason it is done this way is so that all the TupleSpace constructors don't have to throw TupleSpaceException because of the call to setConfig. A configuration tuple looks like: Tuple( new Field(TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1)), new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB))) Any of the fields can be left out and ordering doesn't matter. For fields that are left out, the defaults --- true, -1, TSSmall_DB --- apply.

The accessPermision Tuple contains a single Field that contains an Acl object, as defined in java.security.acl. One can construct an Acl with code like the following.

   Permissions[] p1 = {P_READ,P_WRITE};
   Principal owner = ACLFactory.createPrincipal("Jim");
   Principal grp = ACLFactory.createPrincipal("Jim");
   Acl myacl = AclFactory("MyAcl",owner);
   myacl.addEntry(owner,AclFactory.createAclEntry(owner,p1);
   myacl.addEntry(owner,AclFactory.createAclEntry(grp,p1);
 
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
See Also:
Acl, AclFactory
 o TupleSpace
 public TupleSpace(String name_,
                   String tsServer_,
                   int tsPort_,
                   Tuple configuration_,
                   String userName_,
                   String password_) throws TupleSpaceException
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server. Connections to the server will be made on a specified port.

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
tsServer_ - A string that identifies the TupleSpaceServer that manages the TupleSpace.
tsPort_ - The specific port that the TupleSpaceServer uses to listen for connections from TupleSpace clients.
configuration_ - the configuration tuple for this space
accessPermissions_ - the permissions for this space
userName_ - the user's tspaces user name
password_ - the user's password This constructor calls the constructor with no configuration and then does the configuration. The reason it is done this way is so that all the TupleSpace constructors don't have to throw TupleSpaceException because of the call to setConfig. A configuration tuple looks like: Tuple( new Field(TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1)), new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB))) Any of the fields can be left out and ordering doesn't matter. For fields that are left out, the defaults --- true, -1, TSSmall_DB --- apply.

The accessPermision Tuple contains a single Field that contains an Acl object, as defined in java.security.acl. One can construct an Acl with code like the following.

   Permissions[] p1 = {P_READ,P_WRITE};
   Principal owner = ACLFactory.createPrincipal("Jim");
   Principal grp = ACLFactory.createPrincipal("Jim");
   Acl myacl = AclFactory("MyAcl",owner);
   myacl.addEntry(owner,AclFactory.createAclEntry(owner,p1);
   myacl.addEntry(owner,AclFactory.createAclEntry(grp,p1);
 
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
See Also:
Acl, AclFactory
 o TupleSpace
 public TupleSpace(String name_,
                   String tsServer_,
                   int tsPort_,
                   Tuple configuration_,
                   Tuple accessPermissions_) throws TupleSpaceException
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server. Connections to the server will be made on a specified port.

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
tsServer_ - A string that identifies the TupleSpaceServer that manages the TupleSpace.
tsPort_ - The specific port that the TupleSpaceServer uses to listen for connections from TupleSpace clients.
configuration_ - the configuration tuple for this space
accessPermissions_ - the permissions for this space This constructor calls the constructor with no configuration and then does the configuration. The reason it is done this way is so that all the TupleSpace constructors don't have to throw TupleSpaceException because of the call to setConfig. A configuration tuple looks like: Tuple( new Field(TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1)), new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB))) Any of the fields can be left out and ordering doesn't matter. For fields that are left out, the defaults --- true, -1, TSSmall_DB --- apply.

The accessPermision Tuple contains a single Field that contains an Acl object, as defined in java.security.acl. One can construct an Acl with code like the following.

   Permissions[] p1 = {P_READ,P_WRITE};
   Principal owner = ACLFactory.createPrincipal("Jim");
   Principal grp = ACLFactory.createPrincipal("Jim");
   Acl myacl = AclFactory("MyAcl",owner);
   myacl.addEntry(owner,AclFactory.createAclEntry(owner,p1);
   myacl.addEntry(owner,AclFactory.createAclEntry(grp,p1);
 
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
See Also:
Acl, AclFactory
 o TupleSpace
 public TupleSpace(String name_,
                   String tsServer_,
                   int tsPort_,
                   Tuple configuration_,
                   Tuple accessPermissions_,
                   String userName_,
                   String password_) throws TupleSpaceException
Create a named Tuple Space to be stored and managed by a specified Tuple Space Server. Connections to the server will be made on a specified port.

Parameters:
name_ - A character string that identifies the TupleSpace on the default TupleSpaceServer.
tsServer_ - A string that identifies the TupleSpaceServer that manages the TupleSpace.
tsPort_ - The specific port that the TupleSpaceServer uses to listen for connections from TupleSpace clients.
configuration_ - the configuration tuple for this space
accessPermissions_ - the permissions for this space
userName_ - the user's tspaces name
password_ - the user's tspaces password This constructor calls the constructor with no configuration and then does the configuration. The reason it is done this way is so that all the TupleSpace constructors don't have to throw TupleSpaceException because of the call to setConfig. A configuration tuple looks like: Tuple( new Field(TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1)), new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB))) Any of the fields can be left out and ordering doesn't matter. For fields that are left out, the defaults --- true, -1, TSSmall_DB --- apply.

The accessPermision Tuple contains a single Field that contains an Acl object, as defined in java.security.acl. One can construct an Acl with code like the following.

   Permissions[] p1 = {P_READ,P_WRITE};
   Principal owner = ACLFactory.createPrincipal("Jim");
   Principal grp = ACLFactory.createPrincipal("Jim");
   Acl myacl = AclFactory("MyAcl",owner);
   myacl.addEntry(owner,AclFactory.createAclEntry(owner,p1);
   myacl.addEntry(owner,AclFactory.createAclEntry(grp,p1);
 
Throws: TupleSpaceException
If there is a problem creating the space on the server or communicating with the server or there is a problem with the TupleSpaceName. Currently if access control permissions are not being set for a space the server will not be contacted upon creating a TupleSpace object, but that may change in the future.
See Also:
Acl, AclFactory

Methods

 o setUserName
 public void setUserName(String name_,
                         String password_) throws TupleSpaceException
Set username to be used for access control on this tuplespace

Parameters:
name_ - The new username
password_ - The new password
 o isValidTSName
 public static final boolean isValidTSName(String s)
Returns:
true if this string contains only alpha-numeric characters or '_'
 o setClosingDownByForcingFinalizers
 public void setClosingDownByForcingFinalizers(boolean val_)
should the TupleSpace force finalizers to be run on exit? this method has some security checking on it, so when running in netscape this should be set to false. When it is set to false though, the tuple space system will need to have the TupleSpace.cleanup method called so that it can close its connections to the servers normally. Note that the cleanup method is static so just call it once and all space connections will be cleaned up.

Parameters:
val_ - if true then force them on shutdown, if false do not.
 o connectionTries
 public void connectionTries(int connectionTries_) throws TupleSpaceCommunicationException
Set the connectionTries to a new value. 0 signifies infinity --- try again and again.

Parameters:
connectionTries_ - the number of times to try connecting to the server before failing
Throws: TupleSpaceCommunicationException
if the param is negative or 0
 o connectionWaitTime
 public void connectionWaitTime(int connectionWaitTime_) throws TupleSpaceCommunicationException
Set the connectionWaitTime to a new value.

Parameters:
connectionWaitTime_ - the wait time in between times to try and talk to the server
Throws: TupleSpaceCommunicationException
if the param is negative or 0
 o write
 public void write(SuperTuple tuple) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Add the Tuple to the Tuple Space. The Tuple must have at least one Field.

Parameters:
tuple - The Tuple to be added to the space.
Throws: TupleSpaceException
If a formal (template) tuple is passed, or the Tuple has no Fields.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o write
 public void write(Serializable obj) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Add a Tuple to the Tuple Space that has a single field equal to the Object.

Parameters:
obj - The Serializable for the Field.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o write
 public void write(Serializable obj1,
                   Serializable obj2) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Add a Tuple to the Tuple Space that has two fields equal to the Objects passed in.

Parameters:
obj1 - The Serializable for the first Field.
obj2 - The Serializable for the second Field.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o write
 public void write(Serializable obj1,
                   Serializable obj2,
                   Serializable obj3) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Add a Tuple to the Tuple Space that has two fields equal to the Serializables passed in.

Parameters:
obj1 - The Serializable for the first Field.
obj2 - The Serializable for the second Field.
obj3 - The Serializable for the third Field.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToTake
 public SuperTuple waitToTake(SuperTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that matches a Tuple template. Block until a match is found. Remove the Tuple from the space. For WAITTOTAKE (aka CONSUME), we will require that tuples have content (no NULL tuples). WHY?!? After discussion with Dan and Toby, none of us can remember why we can't take an empty (wildcard) tuple, so I'm eliminating the restriction. (swm 9/22/97) This version of this method name is the most general one -- ie it is for SuperTuples -- you supply a SuperTuple and get a SuperTuple back.

Parameters:
template - A template SuperTuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The SuperTuple that matches the template SuperTuple.
Throws: TupleSpaceException
If the Tuple has no Fields.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToTake
 public Tuple waitToTake(Tuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that matches a Tuple template. Block until a match is found. Remove the Tuple from the space. For WAITTOTAKE (aka CONSUME), we will require that tuples have content (no NULL tuples). WHY?!? After discussion with Dan and Toby, none of us can remember why we can't take an empty (wildcard) tuple, so I'm eliminating the restriction. (swm 9/22/97) This version of this method name is for Tuples only -- you supply a Tuple and get one back.

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceException
If the Tuple has no Fields.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToTake
 public SubclassableTuple waitToTake(SubclassableTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that matches a Tuple template. Block until a match is found. Remove the Tuple from the space. For WAITTOTAKE (aka CONSUME), we will require that tuples have content (no NULL tuples). WHY?!? After discussion with Dan and Toby, none of us can remember why we can't take an empty (wildcard) tuple, so I'm eliminating the restriction. (swm 9/22/97) This version of this method name is for SubclassableTuples --- you supply a subclassable tuple and get the same back.

Parameters:
template - A template SubclassableTuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The SubclassableTuple that matches the template SubclassableTuple.
Throws: TupleSpaceException
If the Tuple has no Fields.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToTake
 public Tuple waitToTake(Serializable obj1) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that has one Field matching the Serializables. Block until a match is found. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToTake
 public Tuple waitToTake(Serializable obj1,
                         Serializable obj2) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that has two Fields matching specified Serializables. Block until a match is found. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
obj2 - An Serializable to match the second Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToTake
 public Tuple waitToTake(Serializable obj1,
                         Serializable obj2,
                         Serializable obj3) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that has three Fields matching specified Serializables. Block until a match is found. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
obj2 - An Serializable to match the second Field against.
obj3 - An Serializable to match the second Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o take
 public SuperTuple take(SuperTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that matches a Tuple template. Do not block. Remove the Tuple from the space. For TAKE (aka CONSUME), we will require that tuples have content (no NULL tuples). After discussion with Dan and Toby, none of us can remember why we can't take an empty (wildcard) tuple, so I'm eliminating the restriction. (swm 9/22/97)

Parameters:
template - A template SuperTuple (one with at least one formal field) that is used to match a tuple in the space. This version of take has a SuperTuple template param and thus is the most general and returns a SuperTuple return tuple.
Returns:
The SuperTuple that matches the template SuperTuple. null if no match
Throws: TupleSpaceException
If the Tuple has no Fields.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o take
 public Tuple take(Tuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that matches a Tuple template. Do not block. Remove the Tuple from the space. For TAKE (aka CONSUME), we will require that tuples have content (no NULL tuples). After discussion with Dan and Toby, none of us can remember why we can't take an empty (wildcard) tuple, so I'm eliminating the restriction. (swm 9/22/97) This version of take has a Tuple param and thus returns a Tuple return value.

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The Tuple that matches the template Tuple. null if no match
Throws: TupleSpaceException
If the Tuple has no Fields.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o take
 public SubclassableTuple take(SubclassableTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that matches a Tuple template. Do not block. Remove the Tuple from the space. For TAKE (aka CONSUME), we will require that tuples have content (no NULL tuples). After discussion with Dan and Toby, none of us can remember why we can't take an empty (wildcard) tuple, so I'm eliminating the restriction. (swm 9/22/97) This version of take has a SubclassableTuple template as a param and thus returns a SubclassableTuple.

Parameters:
template - A template SubclassableTuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The SubclassableTuple that matches the template SubclassableTuple. null if no match
Throws: TupleSpaceException
If the Tuple has no Fields.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o take
 public Tuple take(Serializable obj1) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that has one Field matching the Serializables. Do not block. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o take
 public Tuple take(Serializable obj1,
                   Serializable obj2) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that has two Fields matching specified Serializables. Do not block. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
obj2 - An Serializable to match the second Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o take
 public Tuple take(Serializable obj1,
                   Serializable obj2,
                   Serializable obj3) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a tuple from the space that has three Fields matching specified Serializables. Do not block. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
obj2 - An Serializable to match the second Field against.
obj3 - An Serializable to match the second Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToRead
 public SuperTuple waitToRead(SuperTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Block until matching Tuple is available. But do NOT remove it from the tuple space. For WAITTOREAD, NULL tuples are allowed, as they match anything. This is the general waitToRead method. A SuperTuple is supplied and a SuperTuple is returned. If the template is known to be of type Tuple or subclassableTuple, the more specific waitToReads could be used to avoid having to cast the result to one of those types.

Parameters:
template - A template SuperTuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The SuperTuple that matches the template SuperTuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToRead
 public Tuple waitToRead(Tuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Block until matching Tuple is available. But do NOT remove it from the tuple space. For WAITTOREAD, NULL tuples are allowed, as they match anything. This version of wait to read takes a Tuple param and returns a Tuple. Since a Tuple will only match against another Tuple this is the only possible return value.

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToRead
 public SubclassableTuple waitToRead(SubclassableTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Block until matching Tuple is available. But do NOT remove it from the tuple space. For WAITTOREAD, NULL tuples are allowed, as they match anything. This version of waitToRead is for SubclassableTuples -- you supply a subclassable tuple and it returns the same --- which is actually the only thing possible since a subclassable tuple will never match a Tuple.

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The SubclassableTuple that matches the template SubclassableTuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToRead
 public Tuple waitToRead(Serializable obj) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Block until matching Tuple is available. But do NOT remove if from the tuple space. For WAITTOREAD, NULL tuples are allowed, as they match anything.

Parameters:
obj - The Field of a tuple to match one in the space to be returned.
Returns:
The Tuple that matches the template Tuple constructed from the Serializable.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToRead
 public Tuple waitToRead(Serializable obj1,
                         Serializable obj2) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Block until matching Tuple is available. But do NOT remove if from the tuple space. For WAITTOREAD, NULL tuples are allowed, as they match anything.

Parameters:
obj1 - The Field of a tuple to match one in the space to be returned.
obj2 - The Field of a tuple to match one in the space to be returned.
Returns:
The Tuple that matches the template Tuple constructed from the Serializable.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o waitToRead
 public Tuple waitToRead(Serializable obj1,
                         Serializable obj2,
                         Serializable obj3) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Block until matching Tuple is available. But do NOT remove it from the tuple space. For WAITTOREAD, NULL tuples are allowed, as they match anything.

Parameters:
obj1 - The Field of a tuple to match one in the space to be returned.
obj2 - The Field of a tuple to match one in the space to be returned.
obj3 - The Field of a tuple to match one in the space to be returned.
Returns:
The Tuple that matches the template Tuple constructed from the Serializable.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o read
 public SuperTuple read(SuperTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Non-blocking. But do NOT remove it from the tuple space. For READ, NULL tuples are allowed, as they match anything. The most general read since the most general Tuple type, SuperTuple, is taken as the param which of course leads to a SuperTuple being returned.

Parameters:
template - A template SuperTuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The SuperTuple that matches the template SuperTuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o read
 public Tuple read(Tuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Non-blocking. But do NOT remove it from the tuple space. For READ, NULL tuples are allowed, as they match anything. read will always return a Tuple when the template is a tuple since a tuple only matches a tuple.

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o read
 public SubclassableTuple read(SubclassableTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Non-blocking. But do NOT remove it from the tuple space. For READ, NULL tuples are allowed, as they match anything. A SubclassableTuple only matches another Subclassabletuple so this method returns a SubclassableTuple.

Parameters:
template - A template SubclassableTuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The SubclassableTuple that matches the template SubclassableTuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o read
 public Tuple read(Serializable obj) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Non-blocking. But do NOT remove if from the tuple space. For READ, NULL tuples are allowed, as they match anything.

Parameters:
obj - The Field of a tuple to match one in the space to be returned.
Returns:
The Tuple that matches the template Tuple constructed from the Serializable.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o read
 public Tuple read(Serializable obj1,
                   Serializable obj2) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Non-blocking. But do NOT remove if from the tuple space. For READ, NULL tuples are allowed, as they match anything.

Parameters:
obj1 - The Field of a tuple to match one in the space to be returned.
obj2 - The Field of a tuple to match one in the space to be returned.
Returns:
The Tuple that matches the template Tuple constructed from the object.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o read
 public Tuple read(Serializable obj1,
                   Serializable obj2,
                   Serializable obj3) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve a Tuple from the space that matches the Tuple template. Non-blocking. But do NOT remove it from the tuple space. For READ, NULL tuples are allowed, as they match anything.

Parameters:
obj1 - The Field of a tuple to match one in the space to be returned.
obj2 - The Field of a tuple to match one in the space to be returned.
obj3 - The Field of a tuple to match one in the space to be returned.
Returns:
The Tuple that matches the template Tuple constructed from the object.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o scan
 public Tuple scan(SuperTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve all Tuples from the space that match a Tuple template. Scan is non-blocking -- it will read the current state of the tuple space and return. For SCAN, NULL tuples are allowed as a template, they match anything (this allows us to scan the entire space). Scan returns a Tuple that holds a set of tuples. Each Field is a Tuple that matched the template.

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
A Tuple of Tuples. Each Field in the Tuple is a Tuple that matched the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
formal
 o scan
 public Tuple scan(Serializable obj1,
                   Serializable obj2,
                   Serializable obj3) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve all Tuples from the space that match a Tuple template. Scan is non-blocking -- it will read the current state of the tuple space and return. For SCAN, NULL tuples are allowed as a template, they match anything (this allows us to scan the entire space). Scan returns a Tuple that holds a set of tuples. Each Field is a Tuple that matched the template.

Parameters:
obj1 - An object to match the first Field against.
obj2 - An object to match the second Field against.
obj3 - An Serializable to match the second Field against.
Returns:
A Tuple of Tuples. Each Field in the Tuple is a Tuple that matched the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
formal
 o scan
 public Tuple scan(Serializable obj1,
                   Serializable obj2) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve all Tuples from the space that match a Tuple template. Scan is non-blocking -- it will read the current state of the tuple space and return. For SCAN, NULL tuples are allowed as a template, they match anything (this allows us to scan the entire space). Scan returns a Tuple that holds a set of tuples. Each Field is a Tuple that matched the template.

Parameters:
obj1 - An Serializable to match the first Field against.
obj2 - An Serializable to match the second Field against.
Returns:
A Tuple of Tuples. Each Field in the Tuple is a Tuple that matched the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
formal
 o scan
 public Tuple scan(Serializable obj) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve all Tuples from the space that match a Tuple template. Scan is non-blocking -- it will read the current state of the tuple space and return. For SCAN, NULL tuples are allowed as a template, they match anything (this allows us to scan the entire space). Scan returns a Tuple that holds a set of tuples. Each Field is a Tuple that matched the template.

Parameters:
obj - An Serializable to match the first Field against.
Returns:
A Tuple of Tuples. Each Field in the Tuple is a Tuple that matched the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
formal
 o consumingScan
 public Tuple consumingScan(SuperTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve and delete all Tuples from the space that match a Tuple template. ConsumingScan is non-blocking -- it will read the current state of the tuple space and return. For CONSUMINGSCAN, NULL tuples are allowed as a template, they match anything (this allows us to scan the entire space). ConsumingScan returns a Tuple that holds a set of tuples. Each Field is a Tuple that matched the template.

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
A Tuple of Tuples. Each Field in the Tuple is a Tuple that matched the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
formal
 o consumingScan
 public Tuple consumingScan(Serializable obj1,
                            Serializable obj2,
                            Serializable obj3) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve and delete all Tuples from the space that match a Tuple template. ConsumingScan is non-blocking -- it will read the current state of the tuple space and return. For CONSUMINGSCAN, NULL tuples are allowed as a template, they match anything (this allows us to consumingScan the entire space). ConsumingScan returns a Tuple that holds a set of tuples. Each Field is a Tuple that matched the template.

Parameters:
obj1 - An Serializable to match the first Field against.
obj2 - An Serializable to match the second Field against.
obj3 - An Serializable to match the second Field against.
Returns:
A Tuple of Tuples. Each Field in the Tuple is a Tuple that matched the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
formal
 o consumingScan
 public Tuple consumingScan(Serializable obj1,
                            Serializable obj2) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve and delete all Tuples from the space that match a Tuple template. ConsumingScan is non-blocking -- it will read the current state of the tuple space and return. For CONSUMINGSCAN, NULL tuples are allowed as a template, they match anything (this allows us to consumingScan the entire space). ConsumingScan returns a Tuple that holds a set of tuples. Each Field is a Tuple that matched the template.

Parameters:
obj1 - An Serializable to match the first Field against.
obj2 - An Serializable to match the second Field against.
Returns:
A Tuple of Tuples. Each Field in the Tuple is a Tuple that matched the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
formal
 o consumingScan
 public Tuple consumingScan(Serializable obj) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Retrieve and delete all Tuples from the space that match a Tuple template. ConsumingScan is non-blocking -- it will read the current state of the tuple space and return. For CONSUMINGSCAN, NULL tuples are allowed as a template, they match anything (this allows us to consumingScan the entire space). ConsumingScan returns a Tuple that holds a set of tuples. Each Field is a Tuple that matched the template.

Parameters:
obj - An Serializable to match the first Field against.
Returns:
A Tuple of Tuples. Each Field in the Tuple is a Tuple that matched the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
formal
 o count
 public Tuple count(SuperTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Count all tuples from the space that match a Tuple template. Count is non-blocking -- it will read the current state of the tuplespace and return. For Count, NULL tuples are allowed, as they match anything (this allows us to count the entire space). Count returns a tuple that holds a single integer value.

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
A Tuple with a single Field of type Integer that holds the number of Tuples that matched the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o countN
 public int countN(SuperTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Count all tuples from the space that match a Tuple template. Count is non-blocking -- it will read the current state of the tuplespace and return. For Count, NULL tuples are allowed, as they match anything (this allows us to count the entire space). This is the same as the method "count", but it returns an integer instead of a tuple with an integer. Count returns a tuple that holds a single integer value.

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
An int that is the number of Tuples that matched the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
count
 o delete
 public int delete(SuperTuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Delete all tuples that match this template.

Parameters:
template - A template Tuple that is used to match tuples in the space.
Returns:
An int that is the number of Tuples that were deleted
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
count
 o deleteAll
 public int deleteAll() throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Delete all tuples in a space.

Returns:
An int that is the number of Tuples that were deleted
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
count
 o rhonda
 public Tuple rhonda(Tuple tuple,
                     Tuple template) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
The rendevous primitive. (swm)

Parameters:
tuple - The data tuple (to "out")
template - The template tuple (to "in")
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o makeJarFile
 public byte[] makeJarFile(Class classes_[]) throws IOException, TupleSpaceClientException
For all the classes, if the class is in a jar file, grab the entire jar file otherwise for plain .class classes ship them in their own .jar file. This leads to the possibility of returning multiple byte arrays for different .jar files (for now actually only make one jar file, don't do what is stated wait till class loaders in place to see best way to do this) BUG Alert.

Parameters:
classes_ - the classes to make it from
Returns:
the byte arrays which correspond to the jar files
Throws: IOException
if there is a problem creating the jar file
Throws: TupleSpaceClientException
if there is a problem getting the byte code for one of the classes
 o addHandler
 public void addHandler(String name,
                        Class classes[]) throws TupleSpaceClientException
NOT SUPPORTED ON THE SERVER IN VERSION 1.0.1 Add a new handler to this tuple space. The handler is added to the top factory --- the one most recently added. Note though that a lower level add handler command may be used to accomplish this. We probably need to add more synchronization commands and a stronger API for handler/factory maintenance. Right now, the client can check for SystemTuples that contain info on which handlers belong to which factories and what levels in the chain each factory is at.

Parameters:
classes - the classes for the handler the handler should be the last one
Throws: TupleSpaceClientException
if all the classes are not there
 o getFactoryStack
 public Tuple getFactoryStack() throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Return a scan of all the factory names for this tuple space and their level numbers --- level 0 is the highest --- most recently added --- factory.

Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
updateFactoryInfo
 o getHandlerCommandNames
 public Tuple getHandlerCommandNames(String factoryName_) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Return a scan of all the handler names for this factory --- this feature is *NOT* supported for the built in commands --- TSFSmallTS handlers. Well, it is supported but will just return an empty scan tuple. Also note that the functionality is not general purpose in that it only tells us the commands that are supported but not what type of tuples the command operates on or whatever other criteria there is for a handler to decide if it wants to act on a tuple.

Parameters:
factoryName_ - the name of the factory we are interested in.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
addHandler
 o addFactory
 public void addFactory(Class classes[]) throws TupleSpaceClientException
NOT SUPPORTED ON THE SERVER IN VERSION 1.0.1 add a new factory to this tuple space as the topmost (most powerful) factory.

Parameters:
classes - the classes_ all the classes needed to implement the factory that aren't part of the TupleSpace library with the factory itself being the first one. The factory itself is the class that is derived in some fashion from TSFactory that the user wants to be the implementation of the new factory.
Throws: TupleSpaceClientException
if all the classes are not there
 o createTupleSpace
 public static TupleSpace createTupleSpace(String name_,
                                           String tsServer_,
                                           int tsPort_,
                                           Tuple config_,
                                           Tuple accessPermissions_) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException, TupleSpaceException
Note: createTupleSpace() is deprecated. use constructors

create a tuple space A configuration tuple looks like: Tuple( new Field(TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1)), new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB))) Any of the fields can be left out and ordering doesn't matter. For fields that are left out, the defaults --- true, -1, TSMM_DB --- apply.

Parameters:
name_ - the name of the tuple space.
tsServer_ - the server host.
tsPort_ - the server's port.
config_ - the configuration tuple for this space.
accessPermissions_ - a tuple describing the access permissions for this new space that is either null --- the user group will have access to this space for all operations or of the form: ( Field ( name = attribute, value = String [] groupsThatHavePermission), ...)
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server. This could be the case if the space already exists ie an exception *is* raised if it does.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
TupleSpace, TSHGalaxy
 o createTupleSpace
 public static TupleSpace createTupleSpace(String name_,
                                           Tuple config_,
                                           Tuple accessPermissions_) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException, TupleSpaceException
Note: createTupleSpace() is deprecated. use constructors

create a tuple space given a name for the space and configuration information in the configuration tuple. A configuration tuple looks like: Tuple( new Field(TupleSpace.PERSISTENCE, new Boolean( true)), new Field(TupleSpace.INDEXFIELD, new Integer(-1)), new Field(TupleSpace.TSDBTYPE, new String( TSSmall.Small_DB or TSMMDB.MM_DB))) Any of the fields can be left out and ordering doesn't matter. For fields that are left out, the defaults --- true, -1, TSSmall_DB --- apply.

Parameters:
name_ - the name of the tuple space.
config_ - the configuration tuple for this space.
accessPermissions_ - a tuple describing the access permissions for this new space that is either null --- the user group will have access to this space for all operations or of the form: ( Field ( name = attribute, value = String [] groupsThatHavePermission), ...)
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server. This could be the case if the space already exists ie an exception *is* raised if it does.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
TupleSpace, TSHGalaxy
 o destroy
 public void destroy() throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
 o parseConfigTuple
 public static Object parseConfigTuple(String fieldName_,
                                       SuperTuple configTuple_) throws TupleSpaceException
 o exists
 public boolean exists() throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
 o status
 public static Tuple status(String tsServer_,
                            int tsPort_) throws TupleSpaceClientException, TupleSpaceServerException
 o eventTemplate
 public static Tuple eventTemplate(String targetCmdString,
                                   SuperTuple targetTuple,
                                   Class operation)
 o eventRegister
 public int eventRegister(String commandName_,
                          SuperTuple argTuple_,
                          Callback callback_) throws TupleSpaceException
Register for an event on the server. An event is the exection of some command on some tuple. MAKE SURE you don't do much in your callback handler, the thread that handles communication to the tuple space server(s) for this VM will be calling call personally and you don't want to tie that guy up. later will probably make the callback thing into a thread or will use Java's event mechanisms to hand the event to that guy. But just like this for now.

Parameters:
commandName_ - the command to be on the watch for!
argTuple_ - the tuple to be on the look at for happening on the above commandName
callback_ - what code to call when the event happens make sure this code returns false for deregistering after a call is executed
Returns:
the sequence number for this registration.
 o command
 public SuperTuple command(String cmdString_,
                           SuperTuple argTuple_) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Issue a command to the TupleSpace and pass along a Tuple as an argument. The command is a text string that is recongized by the TupleSpace. The results of the command, if any, are returned as a tuple. The commands recognized by all TupleSpaces are: "in" - Remove and return a Tuple from the space that matches the argument Tuple. "read" - Like "in", but do not remove the Tuple from the space. "out" - Add the argument Tuple to the space. "scan" - Remove all tuples that match the arguement tuple? "count" - Count the Tuples that match the argument Tuple and return the value as a Tuple with a single integer Field. New commands can be added to the space by sending a new TupleSpaceHandler.

Parameters:
cmdString_ - The String that names the command.
argTuple_ - The argument Tuple, can be null.
Returns:
A result Tuple, the format of which depends upon the command.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
See Also:
TupleSpaceHandler
 o killConnection
 public static synchronized void killConnection(String key_,
                                                Exception ioe_)
this method is used to close the current connection to the server. It is called by CallbackThread and talkToAServer if they get an io error on the input end of the socket connection to the server which indicates that this socket is probably bad so instead of fooling around with the socket let's just close the streams and reopen a new socket.

Parameters:
key_ - the hostname and port catted together
ioe_ - the ioexception that occured.
See Also:
CallbackThread
 o cleanup
 public static synchronized void cleanup()
this method is used to close the current connections to the server. By default, the TupleSpace sets it up so the VM runs finalizers on exit and thus, the CallbackThread and ServerConnection classes finalizers are called and cleanup is performed that way. But, if the user did not want this, they can set _closingDownByForcingFinalizers to false and then just call this method when they are done with TupleSpace. The method closes down the streams connecting the client to the server. This way the server can tell that this is a normal termination.

 o getName
 public String getName()
Return the space name. Cool for debugging.

Returns:
String - the name of the space
 o getServer
 public String getServer()
Return the name of the server. Cool for debugging.

Returns:
String - the name of the server
 o getPort
 public int getPort()
Return the number of the port. Cool for debugging.

Returns:
int - the number of the port
 o getVersion
 public static String getVersion()
Class Method to Return the TSpaces Code Version number. This Version number is in the form: V.L.M Where "V" is the Version and is currently 1. "L" is the Level number "M" is the Modification number. For example: 1.0.1 The intent is that the "V" version number will change only for a very major change. The "L" Level number will change when new major new features are added and/or incompatible changes are made. The "M" Modification number will change when a new level of code is distributed to fix problems and posibly add minor new compatible function.

Returns:
String - Version.Level.Modificatio
 o out
 public void out(Tuple tuple) throws TupleSpaceException, TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: out() is deprecated. Use write() instead

Add the Tuple to the Tuple Space.

Parameters:
tuple - The Tuple to be added to the space.
Throws: TupleSpaceException
If a formal (template) tuple is passed, or the Tuple has no Fields.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o out
 public void out(Serializable obj) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: out() is deprecated. Use write() instead

Add a Tuple to the Tuple Space that has a single field equal to the Object.

Parameters:
obj - The Serializable for the Field.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o out
 public void out(Serializable obj1,
                 Serializable obj2) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: out() is deprecated. Use write() instead

Add a Tuple to the Tuple Space that has two fields equal to the Serializables passed in.

Parameters:
obj1 - The Serializable for the first Field.
obj2 - The Serializable for the second Field.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o out
 public void out(Serializable obj1,
                 Serializable obj2,
                 Serializable obj3) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: out() is deprecated. Use write() instead

Add a Tuple to the Tuple Space that has two fields equal to the Serializables passed in.

Parameters:
obj1 - The Serializable for the first Field.
obj2 - The Serializable for the second Field.
obj3 - The Serializable for the third Field.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o in
 public Tuple in(Tuple template) throws TupleSpaceException, TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: in() is deprecated. Use waitToTake() instead.

Retrieve a tuple from the space that matches a Tuple template. Block until a match is found. Remove the Tuple from the space. For IN (aka CONSUME), we will require that tuples have content (no NULL tuples).

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceException
If the Tuple has no Fields.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o in
 public Tuple in(Serializable obj1) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: in() is deprecated. Use waitToTake() instead.

Retrieve a tuple from the space that has one Field matching the Serializables. Block until a match is found. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o in
 public Tuple in(Serializable obj1,
                 Serializable obj2) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: in() is deprecated. Use waitToTake() instead.

Retrieve a tuple from the space that has two Fields matching specified Serializables. Block until a match is found. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
obj2 - An Serializable to match the second Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o in
 public Tuple in(Serializable obj1,
                 Serializable obj2,
                 Serializable obj3) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: in() is deprecated. Use waitToTake() instead.

Retrieve a tuple from the space that has three Fields matching specified Serializables. Block until a match is found. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
obj2 - An Serializable to match the second Field against.
obj3 - An Serializable to match the second Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o inp
 public SuperTuple inp(SuperTuple template) throws TupleSpaceException, TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: inp() is deprecated. Use take() instead.

Retrieve a tuple from the space that matches a Tuple template. Do not block. Remove the Tuple from the space. For IN (aka CONSUME), we will require that tuples have content (no NULL tuples).

Parameters:
template - A template Tuple (one with at least one formal field) that is used to match a tuple in the space.
Returns:
The Tuple that matches the template Tuple. null if no match
Throws: TupleSpaceException
If the Tuple has no Fields.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o inp
 public SuperTuple inp(Serializable obj1) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: inp() is deprecated. Use take() instead.

Retrieve a tuple from the space that has one Field matching the Serializables. Do not block. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o inp
 public SuperTuple inp(Serializable obj1,
                       Serializable obj2) throws TupleSpaceCommunicationException, TupleSpaceClientException, TupleSpaceServerException
Note: inp() is deprecated. Use take() instead.

Retrieve a tuple from the space that has two Fields matching specified Serializables. Do not block. Remove the Tuple from the space. The value and type of the Serializables (e.g., String) will be used to create the fields of the template tuple. If the Serializable is of type Field, then it will be used instead of being the value of the Field.

Parameters:
obj1 - An Serializable to match the first Field against.
obj2 - An Serializable to match the second Field against.
Returns:
The Tuple that matches the template Tuple.
Throws: TupleSpaceCommunicationException
There are problems connecting to the TupleSpace Server
Throws: TupleSpaceServerException
There was a problem executing the command on the server.
Throws: TupleSpaceClientException
There were problems preparing the command to be sent to the server.
 o main
 public static void main(String argv[])
Test routine.


All Packages  Class Hierarchy  This Package  Previous  Next  Index