public class Server extends Observable implements Runnable
Modifier and Type | Method and Description |
---|---|
Cell[][] |
getCells()
Return the cells to be share
|
static Server |
getInstance()
Method that returns the running instance of the server
|
CellNetworkListenerServer |
getListener()
Method that returns the listener of the cells
|
String |
getProperties()
Method that returns the properties of the connection
|
ArrayList<Socket> |
getSockets()
Return the connection sockets
|
void |
run()
running thread
|
void |
startServer(int port,
Cell[][] cells,
String password,
String properties,
Observer observer)
Method that will start the server and share the cells throw network
|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
public static Server getInstance()
public CellNetworkListenerServer getListener()
public String getProperties()
public void startServer(int port, Cell[][] cells, String password, String properties, Observer observer)
port
- connection portcells
- value that will be shared throw networkpassword
- the connection passwordproperties
- the connection propertiesobserver
- the observer classpublic ArrayList<Socket> getSockets()