12 |
|
import java.net.UnknownHostException; |
13 |
|
import org.omg.CORBA.*; |
14 |
|
import org.omg.CosNaming.*; |
15 |
+ |
import uk.ac.ukc.iscream.refman.*; |
16 |
|
|
17 |
|
/** |
18 |
|
* A socket listener to listen for new hosts registering with the system. |
42 |
|
* @param configManager a reference to the ConfigurationManager we are using |
43 |
|
* @param port The port that the server will listen on. |
44 |
|
*/ |
45 |
< |
public TCPReader(Logger logger, ConfigurationManager configManager, int port, Filter parent) { |
45 |
< |
_logger = logger; |
46 |
< |
_configManager = configManager; |
45 |
> |
public TCPReader(int port, Filter parent) { |
46 |
|
_port = port; |
47 |
|
_parent = parent; |
48 |
|
_logger.write(toString(), Logger.SYSINIT, "started"); |
97 |
|
if(run){ |
98 |
|
try { |
99 |
|
// Setup the HostInit so it can carry on communications with the host |
100 |
< |
TCPReaderInit init = new TCPReaderInit(hostSocket, _configManager, _logger, _parent); |
100 |
> |
TCPReaderInit init = new TCPReaderInit(hostSocket, _parent); |
101 |
|
// and start it |
102 |
|
init.start(); |
103 |
|
} catch (IOException e) { |
128 |
|
/** |
129 |
|
* A reference to the logger the system is using |
130 |
|
*/ |
131 |
< |
Logger _logger; |
133 |
< |
|
134 |
< |
/** |
135 |
< |
* A reference to the configurator the system is using |
136 |
< |
*/ |
137 |
< |
ConfigurationManager _configManager; |
131 |
> |
Logger _logger = ReferenceManager.getInstance().getLogger(); |
132 |
|
|
133 |
|
/** |
134 |
|
* The port on which the server should listen. |