This is the GUI interface that provides a
a way to edit an AclEntry
AclEntryEdit is simply a JPanel Subclass that
is placed inside of a JDialog object so that the
user can specify the information that goes into
an AclEntry object.
This class will create various objects that implement the
java.security.acl interfaces
AclFactory.createAcl()
AclFactory.createAclEntry()
AclFactory.createPrincipal();
AclFactory.createPermission();
Although its name suggests that this is a Java object Factory,
in fact it is not.
Adds a TupleSpace object to this Transaction object so that any operation
on an added space will be treated as part of this Transaction object if
enclosed between a beginTrans() and commitTrans()/abortTrans() operations
The method that applies the query to the TSMMDB that I've got
It creates an instance of XQueryImpl and then calls the
processQuery method for that class.
This is the authentication method that is invoked by the server when
it has the userid and password in hand (instead of an ObjectStream)
It will then validate the user/key combination by checking the
Hashtable where we have stored all the user/key combinations.
The Callback interface is implemented by the class that is given to the
tuple space call back mechanism for notification that some tuple became
"available" on the server
copyToLocal will copy the URL data from the Server to a local file
It will do the copy by specifing a URL that points to the HTTP server
maintained by TSpaces and using it to read the file and serve it to
the client.
Construct an instance of an Acl with a userid
string specified for the owner instead of a Principle
To complete the Acl, you need to add some AclEntry objects to it.
decrement the semaphore, make sure your code is able to call this method ---
wherever you call decr from had better not be holding locks that are needed
for the other part to call incr
We support the caller specifing a max waittime after which it will
return null.
This inner class represents that status of a component:
either not running (in which case the status light is
a dimmed color) or running (in which case the status
light is a green color).
destroy() is called when the applet is going to be permanently stoped
We will decrement the instance count and if it is now zero
we will cleanup the TSpaces connection.
Use wants to add a new User to the selected
group (or user) This is similar to adding
a group but you will be asked for a password and
the userid and password will be added to a
list of users and groups.
Needed because all classes that go in a Field of a Tuple must have an
equals operator defined; even though the exception classes only go in
there to be passed back to the client and are never put into a space,
this is the way it is for now.
To be Implemented !! If the client tries to call eventRegister in RMI implementation, a TupleSpaceException will be thrown, with the corresponding message.
Show how a client can register for events that are happening to a tuple space.
Example3() -
Constructor for class com.ibm.tspaces.examples.simple.Example3
The constructor for this class will setup everything so that the
call method will be given control when interesting things happen
to the related TupleSpace
This class demonstrates the use of T Spaces to comunicate
application defined objects using FieldPS instead of Field
to specify the field in the Tuple.
get rid of a connection to the server; unfortunately the finalize method is not
called at program exit so this is not a way to clean up sockets when the program is
exiting.
finalize() -
Method in class com.ibm.tspaces.examples.services.Demo
Method to return a Vector of all attributes
For code consistency and security, the Vector returned is actually
just a clone of the Vector, so all additions to the attribute list
and removals of attributes have to be done by using the class methods
provided in this class.
Get the child tuple ids of the current Tuple
we need this on the client side because we
cannot get the list of tuples using the server-side methods,
ie: db.fetchTupleById(...) in "getTuple(...)"
after we get this, we can manually read each tuple by it's
id.
getQueryResult *
The accessor for the queryResualt
getRef() -
Static method in class com.ibm.tspaces.server.TSServer
Return a reference to the current TSServer instance
If it returns null then maybe you are a client and not a server
but if you are running a client in the same Java Virtual Machine as the
server than you would get the refernce to the server even though you are
just a lowly client.
Do I handle this command on this argument?
For now, always say yes because the factory will only call us on
the command strings that we handle and we operate on all types of tuples
When each handler only handles one command, can tighten this up.
increment the semaphore, make sure your code is able to call this method ---
wherever you call decr from had better not be holding locks that are needed
for the other part to call incr
init() -
Method in class com.ibm.tspaces.examples.whiteboard.Whiteboard
Initialization:
This could be entered automatically when running as an applet
or by being called from main() is being run from an
application.
init() -
Method in class com.ibm.tspaces.examples.simple.AppletTst1
Initialization:
This could be entered automatically when running as an applet
or by being called from main() is being run from an
application.
init() -
Method in class com.ibm.tspaces.examples.simple.SuperHeros
Here is where we will write the initial data to the
tuplespace
Then we will do the queries.
init() -
Method in class com.ibm.tspaces.examples.simple.Example4a
init() -
Method in class com.ibm.tspaces.examples.services.SendMail
This will handle the initial processing
It will do any backlog of requests by looking for
unprocessed tuples
It will set up RegisterEvent to process all future events
init() -
Method in class com.ibm.tspaces.examples.services.Pager
This will handle the initial processing
It will do any backlog of requests by looking for
unprocessed tuples
It will set up RegisterEvent to process all future events
Initialize the TSAclDBase instance
This will read special User and group information from the
config file so that this class can respond correctly to
ACVerifier methods.
Return true if the current time is greater than the
Tuple (_timeStamp + _expire)
Normally this should only be done by the server since the
_timestamp is set by the server and the client and
server clocks may not be in sync.
This class implements a a dialog panel that will request a
a TSpaces server and the userid and password
This was originally a 1.1 AWT dialog and has been converted
directly to use JFC.
The starting point of execution for the Worker thread
We will parse the command line
Usage: Worker [-D] [-h tsHost] [-n tsName] [number]
number = the number of Worker threads to start.
The starting point of execution for the Migrate thread
We will parse the command line
Usage: Migrate [-D] [-h tsHost] [-n tsName] [number]
number = the number of Migrate threads to start.
This is code to issue the SHUTDOWN
Syntax:
java com.ibm.tspaces.examples.services.Shutdown host user password
The default is to use the Default port 8201.
This is code to test the handler by simulating what a client
application would do to load a special handler and then invode the
the new commands.Normally this code would be part of the application
that is going to to make use of the handler.
PrintText accepts "PrintText"" requests from TupleSpace and
issues a specified command to send the specified text to
the printer
The PrintText service is started by issuing the java invocation and
specifying the PrinterName, PrintCommand and FileDirectory as parameters
Method to replace a child tuple with a new child tuple in the child list
The method returns true or false depending on whether the oldchild
could be found or not.
This is the main code for the callback listener thread.
run() -
Method in class com.ibm.tspaces.services.utility.Worker
The starting point of execution.
run() -
Method in class com.ibm.tspaces.services.utility.Migrate
The starting point of execution for each space.
run() -
Method in class com.ibm.tspaces.examples.mergesort.SortThread
The starting point of execution.
run() -
Method in class com.ibm.tspaces.examples.mergesort.MergeSort2
Starting point of execution for thread.
run() -
Method in class com.ibm.tspaces.examples.mergesort.MergeSort
Starting point of execution for thread.
run() -
Method in class com.ibm.tspaces.examples.mergesort.Merger
The starting point of execution.
run() -
Method in class com.ibm.tspaces.examples.whiteboard.Whiteboard
run: Is entered as as a result of a start thread
It is not currently being used.
run() -
Method in class com.ibm.tspaces.examples.simple.AppletTst1
run: Is entered as as a result of a start thread
It is not currently being used.
run() -
Method in class com.ibm.tspaces.examples.simple.Example3
This run method will write some Tuples to the space
This could represent the actions of another client.
run() -
Method in class com.ibm.tspaces.examples.services.SendMail
The run() method will wait for mail Tuple to be queue
The Tuple has the format:
[ String name, String to-email-addr, String message ]
or
[ String name, String[] mail-headers, String message ]
run() -
Method in class com.ibm.tspaces.examples.services.TstClient
run() -
Method in class com.ibm.tspaces.examples.services.PrintText
The run() method will wait for a print request Tuple to be Queued
It will then take the request from TSpaces and then invoke the
print method to Print the text that is included in the Tuple.
run() -
Method in class com.ibm.tspaces.examples.services.TstServer
The run() method will wait for a request Tuple to be Queued
It will then take the request from TSpaces and then invoke the
test() method .
run() -
Method in class com.ibm.tspaces.examples.services.Pager
The run() method will wait for pager Tuple to be queued
The Tuple has the format:
[ String name, String to-page-addr, String message ]
run() -
Method in class com.ibm.tspaces.examples.services.WorkerTest
The starting point of execution.
run() -
Method in class com.ibm.tspaces.examples.services.PrintTester
SendMail accepts "SendMail" requests from TupleSpace and
sends the specified message to the specified userid
The SendMail service is started by issuing the java invocation and
specifying the SMTP Host system as a parameter
java com.ibm.tspaces.examples.services.SendMail mail.sys.com
A client that wants to use the services needs to only do the following
SENDMAIL -
Static variable in class com.ibm.tspaces.examples.services.TService
Send a response to the client,
All responses should come through here!
If the communication fails we disable all further communication with this
port, indicate that TSIOHandler should stop and return false to the caller.
Reset the Vector that contains the Fields
Used to clone the SuperTuple
Since clients should not be aware of this Vector this must be
a protected field.
Set default username to be used for access control for all spaces
in this virtual mmachine It will be used in the TupleSpace Constructor
if not specified as a parameter and it will also be used for static commands
issued prior to the constructor which setup a server connection
(i.e.
Simple1 - class com.ibm.tspaces.examples.simple.Simple1.
This class implements a very simple TupleSpace program.
Simple1() -
Constructor for class com.ibm.tspaces.examples.simple.Simple1
Simple2 - class com.ibm.tspaces.examples.simple.Simple2.
Simple2() -
Constructor for class com.ibm.tspaces.examples.simple.Simple2
size() -
Method in class com.ibm.tspaces.xtuples.TSXQuery
Returns our best guess at the potential size of the result of this query
For XMLQueries this is hard to say, but this is really an issue of how
many documents of each DTD type are stored inside the TSDB.
This example is based on the SuperHeros example that
was in one of the TSpaces publications
One of the differentiating features of TSpaces is that it
builds an index on each named field in a tuple.
Create a TSServer using the specified parameters
It will use the information that is either passed to the
construtor as parameters or is in the Configuration file to
start up the pieces of the TSServer.
TstServer accepts "TstServer"" requests from TupleSpace and
simulates the processing of the request
The TstServer service is started by issuing the java invocation and
specifying the TupleSpace host name as parameters
A Tuple is an ordered sequence of Fields, and implements the
non-subclassable (structure-equivalence) version.
Nothing interesting, just the fact that Tuple is final.
Update the tuple in the space that matches the supplied Tuple
It is assumed that the Tuple supplied has been retrieved from the
space and contains a valid TupleID.
This constructor takes a filename and builds a URL object that
is used in further processing
This constructor can only be used on a TSpaces client to
create the original URLCopy object.
The Waiter class is used as the simplest type of callback method for
making the basic synchronous tuple space operations actually synchronous
in the case where the server is going to do a call back.
Indicates that the command being sent is not part of any bigger transaction
At the server side, the command will be preceded by a beginTrans and succeeded
by a commitTrans
_started -
Static variable in class com.ibm.tspaces.examples.simple.AppletTst1
This will be set true when start() called and
set to false when stop() is called;