distrit.server
Class ServerRecord

java.lang.Object
  |
  +--distrit.server.ServerRecord

public class ServerRecord
extends java.lang.Object

Record representing an InteractiveTaskServer. Used for managing the allocation of multiple clients to multiple servers in a multi server environment.


Field Summary
protected  java.util.HashSet allocatedClients
           
protected  java.lang.String name
           
protected  InteractiveTaskServer server
           
protected  java.lang.String specificClientName
           
 
Constructor Summary
ServerRecord(java.lang.String name, InteractiveTaskServer server, java.lang.String specificClientName)
          Creates a new instance of ServerRecord
 
Method Summary
 void allocateClient(ClientRecord cr)
          Adds a client to the set allocated to this server
 void deallocateClient(ClientRecord cr)
          Removes a client to the set allocated to this server
 java.util.HashSet getAllocatedClients()
          Get method for the set of clients currently allocated to this server
 java.lang.String getName()
          Get method for this server's unique name
 InteractiveTaskServer getServer()
          Get method for the actual server object within this record
 java.lang.String getSpecificClientName()
          Get method for the name of the client specifically allocated to this server
 void setSpecificClientName(java.lang.String specificClientName)
          Set method for the name of the client specifically allocated to this server
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

server

protected InteractiveTaskServer server

specificClientName

protected java.lang.String specificClientName

allocatedClients

protected java.util.HashSet allocatedClients
Constructor Detail

ServerRecord

public ServerRecord(java.lang.String name,
                    InteractiveTaskServer server,
                    java.lang.String specificClientName)
Creates a new instance of ServerRecord
Parameters:
name - A unique name for this server
server - Actual InteractiveTaskServer object
specificClientName - Name of client specifically allocated to this server. A "" or null value define a server with no specific client
Method Detail

getName

public java.lang.String getName()
Get method for this server's unique name
Returns:
This server's unique name

getServer

public InteractiveTaskServer getServer()
Get method for the actual server object within this record
Returns:
The actual server object within this record

getSpecificClientName

public java.lang.String getSpecificClientName()
Get method for the name of the client specifically allocated to this server
Returns:
The name of the client specifically allocated to this server

setSpecificClientName

public void setSpecificClientName(java.lang.String specificClientName)
Set method for the name of the client specifically allocated to this server
Parameters:
specificClientName - The name of the client specifically allocated to this server

allocateClient

public void allocateClient(ClientRecord cr)
Adds a client to the set allocated to this server
Parameters:
cr - Record of client to be added to the allocation set

deallocateClient

public void deallocateClient(ClientRecord cr)
Removes a client to the set allocated to this server
Parameters:
cr - Record of client to be removed to the allocation set

getAllocatedClients

public java.util.HashSet getAllocatedClients()
Get method for the set of clients currently allocated to this server
Returns:
The set of clients currently allocated to this server

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object