14 |
|
import uk.ac.ukc.iscream.util.*; |
15 |
|
|
16 |
|
/** |
17 |
< |
* A socket listener to listen for new hosts registering with the system. |
18 |
< |
* When a host makes a connection, the connecton is past to an instance |
19 |
< |
* of the HostInit class, which handles further communication. |
17 |
> |
* Reads TCP Heartbeats from the host applications. |
18 |
|
* |
19 |
|
* @author $Author$ |
20 |
|
* @version $Id$ |
33 |
|
//---CONSTRUCTORS--- |
34 |
|
|
35 |
|
/** |
36 |
< |
* Constructs a new listener |
36 |
> |
* Constructs a new TCPReader |
37 |
|
* |
38 |
< |
* @param logger a reference to the logger we are using |
39 |
< |
* @param configManager a reference to the ConfigurationManager we are using |
42 |
< |
* @param port The port that the server will listen on. |
38 |
> |
* @param queue A reference to our Queue |
39 |
> |
* @param port The port that the TCPReader will listen on |
40 |
|
*/ |
41 |
|
public TCPReader(int port, Queue queue) { |
42 |
|
_port = port; |
92 |
|
// If we've stopped on the line above we won't want to try this ! |
93 |
|
if(run){ |
94 |
|
try { |
95 |
< |
// Setup the HostInit so it can carry on communications with the host |
95 |
> |
// Setup the TCPReaderInit and start it |
96 |
|
TCPReaderInit init = new TCPReaderInit(hostSocket, _queue); |
97 |
|
// and start it |
98 |
|
init.start(); |
149 |
|
*/ |
150 |
|
private int _port; |
151 |
|
|
152 |
+ |
/** |
153 |
+ |
* A reference to our Queue |
154 |
+ |
*/ |
155 |
|
private Queue _queue; |
156 |
|
|
157 |
|
//---STATIC ATTRIBUTES--- |