base.network
Class Network

java.lang.Object
  extended by base.network.Network

public class Network
extends java.lang.Object


Constructor Summary
Network()
           
Network(java.lang.String name, Workstation[] server, Workstation[] client)
           
 
Method Summary
protected  void addClient(Workstation client)
          This method simply adds a client to the network.
protected  void addClientSet(Workstation[] client)
          This method simply adds a workstation's client set to the network.
protected  void addServer(Workstation server)
          This method simply adds a server to the network.
protected  void addServerSet(Workstation[] server)
          This method simply adds a workstation's server set to the network.
protected  void deleteClient(java.lang.String workstationKey)
          This method deletes a client workstation.
protected  void deleteServer(java.lang.String workstationKey)
          This method deletes a server workstation.
 Workstation[] getAllWorkstation()
           
 Workstation[] getClient()
           
 Workstation getClientById(int workstationId)
          This method retrieves a client workstation specifying his id.
 java.lang.String getName()
           
 Workstation[] getServer()
           
 Workstation getServerById(int workstationId)
          This method retrieves a server workstation specifying his id.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Network

public Network()

Network

public Network(java.lang.String name,
               Workstation[] server,
               Workstation[] client)
Method Detail

getAllWorkstation

public Workstation[] getAllWorkstation()

getServer

public Workstation[] getServer()
Returns:
Returns the server.

getClient

public Workstation[] getClient()
Returns:
Returns the client.

addClient

protected void addClient(Workstation client)
This method simply adds a client to the network.

Parameters:
client - The client to add to the network.

addServer

protected void addServer(Workstation server)
This method simply adds a server to the network.

Parameters:
server - The server to add to the network.

addClientSet

protected void addClientSet(Workstation[] client)
This method simply adds a workstation's client set to the network.

Parameters:
client - A set of client workstations to add to the network.

addServerSet

protected void addServerSet(Workstation[] server)
This method simply adds a workstation's server set to the network.

Parameters:
server - A set of server workstations to add to the network.

getName

public java.lang.String getName()
Returns:
Returns the name.

toString

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

deleteClient

protected void deleteClient(java.lang.String workstationKey)
This method deletes a client workstation.

Parameters:
workstationKey - The client workstation to delete in form of key string.

deleteServer

protected void deleteServer(java.lang.String workstationKey)
This method deletes a server workstation.

Parameters:
workstationKey - The server workstation to delete in form of key string.

getClientById

public Workstation getClientById(int workstationId)
This method retrieves a client workstation specifying his id.

Parameters:
workstationId - An id associated to the client to retrieve.
Returns:
A client workstation with id equals to workstationId, null if the specified workstationId is not a valid client workstation's id.

getServerById

public Workstation getServerById(int workstationId)
This method retrieves a server workstation specifying his id.

Parameters:
workstationId - An id associated to the server to retrieve.
Returns:
A server workstation with id equals to workstationId, null if the specified workstationId is not a valid server workstation's id.


Copyright © 2006 SF.net. All Rights Reserved.