distrit.testing
Class TestITS

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--distrit.testing.TestITS
All Implemented Interfaces:
InteractiveTaskServer, java.rmi.Remote, java.io.Serializable

public class TestITS
extends java.rmi.server.UnicastRemoteObject
implements InteractiveTaskServer

See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
TestITS()
          Creates a new instance of TestITS
 
Method Summary
 void bindServer()
           
 java.lang.Object getID(java.lang.Object init)
          Called by clients the first time they connect.
 InteractiveTask getTask(java.lang.Object id)
          This will provide the client with the InteractiveTask it should run.
 java.lang.Object interact(java.lang.Object ID, java.lang.Object clientTaskOutput)
          Called by clients when they wish to interact.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestITS

public TestITS()
        throws java.rmi.RemoteException
Creates a new instance of TestITS
Method Detail

main

public static void main(java.lang.String[] args)

bindServer

public void bindServer()

getID

public java.lang.Object getID(java.lang.Object init)
                       throws java.rmi.RemoteException
Description copied from interface: InteractiveTaskServer
Called by clients the first time they connect.
Specified by:
getID in interface InteractiveTaskServer
Following copied from interface: distrit.InteractiveTaskServer
Parameters:
initialParameters - Initial parameters from client local configuration. The current client implementation, see InteractiveTaskClient, provides the ip address of the client and the command line paramaters used to launch the client. These are packaged in a Vector.
Returns:
The ID of this client will from now on used for interaction with the server.

getTask

public InteractiveTask getTask(java.lang.Object id)
                        throws java.rmi.RemoteException
Description copied from interface: InteractiveTaskServer
This will provide the client with the InteractiveTask it should run.
Specified by:
getTask in interface InteractiveTaskServer
Following copied from interface: distrit.InteractiveTaskServer
Parameters:
id - The ID provided by the getID method by which the client will always refer to itself.
Returns:
The task this client should run. This could be exactly the same as the one all other clients are running or tailored to this particular client.

interact

public java.lang.Object interact(java.lang.Object ID,
                                 java.lang.Object clientTaskOutput)
                          throws java.rmi.RemoteException
Called by clients when they wish to interact.
Specified by:
interact in interface InteractiveTaskServer
Parameters:
ID - the client's ID
clientTaskOutput - the outputs of the client obtained by task.get( null ) on the client task
Returns:
whatever should be sent into the client through task.set( )