public class GUIClient extends AbstractClient
Constructor and Description |
---|
GUIClient(java.lang.String master,
java.lang.String slaves,
java.lang.String[] params)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close_connection()
Stop the connection with the server.
|
void |
connect_to_server()
Stablish a communication with Master.
|
void |
do_require()
Send a message to Master asking for some slaves, given by the user.
|
void |
init()
Initiate in and out buffers.
|
void |
process_data()
Send to Master the simulation data.
|
java.lang.String |
process_params()
Transform params array into an string separated by comma.
|
void |
process_response()
Process the response of the simulation.
|
void |
run()
Communicate with the server and start a new simulation.
|
void |
send_request(StringMessage request)
Send a message to master.
|
public GUIClient(java.lang.String master, java.lang.String slaves, java.lang.String[] params)
master
- a valid IP address for the server.slaves
- number of slavesparams
- a set of simulation parameters.public void run()
run
in interface java.lang.Runnable
run
in class AbstractClient
public void connect_to_server()
public void init()
public void send_request(StringMessage request)
request
- The message to be sent.public void close_connection()
public void do_require()
public void process_data()
public void process_response()
public java.lang.String process_params()