Network
Class Network

java.lang.Object
  extended by Network.Network

public class Network
extends java.lang.Object

Class Network Repertorie toutes les connections actives


Field Summary
private  Connection[] connections
           
 
Constructor Summary
Network()
           
 
Method Summary
 void addConnection(Connection c)
          Ajoute une connection dans le tableau des connexions
 void closeConnections()
          Ferme toutes les connections en cours
 Connection[] getConnections()
          Get the value of connections
 void removeConnection(int id)
          Enlève la connection id dans le tableau des connexions
 void send(int id, java.lang.String data)
          Envoie la chaine data à travers la connexion établie id
 void send(java.lang.String data)
          Envoie la chaine data à travers toutes les connexions établies
 void setConnections(Connection[] value)
          Set the value of connections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connections

private Connection[] connections
Constructor Detail

Network

public Network()
Method Detail

addConnection

public void addConnection(Connection c)
Ajoute une connection dans le tableau des connexions

Parameters:
c - la connection ajoutée

closeConnections

public void closeConnections()
Ferme toutes les connections en cours


getConnections

public Connection[] getConnections()
Get the value of connections

Returns:
the value of connections

removeConnection

public void removeConnection(int id)
Enlève la connection id dans le tableau des connexions

Parameters:
id - l'identifiant de la connection à enlevée

send

public void send(int id,
                 java.lang.String data)
Envoie la chaine data à travers la connexion établie id

Parameters:
id - de la connexion
data -

send

public void send(java.lang.String data)
Envoie la chaine data à travers toutes les connexions établies

Parameters:
data -

setConnections

public void setConnections(Connection[] value)
Set the value of connections