5 |
|
import uk.ac.ukc.iscream.core.*; |
6 |
|
import uk.ac.ukc.iscream.filter.*; |
7 |
|
import uk.ac.ukc.iscream.util.*; |
8 |
+ |
import uk.ac.ukc.iscream.componentmanager.*; |
9 |
|
import java.net.Socket; |
10 |
|
import java.io.*; |
11 |
|
|
30 |
|
|
31 |
|
//---CONSTRUCTORS--- |
32 |
|
|
33 |
+ |
/** |
34 |
+ |
* Construct a new HostInit. |
35 |
+ |
* |
36 |
+ |
* @param socket The socket to which the host is connected |
37 |
+ |
*/ |
38 |
|
public HostInit(Socket socket) throws IOException { |
39 |
|
_socket = socket; |
40 |
+ |
// setup reader & writer |
41 |
|
_socketIn = new BufferedReader(new InputStreamReader(_socket.getInputStream())); |
42 |
|
_socketOut = new PrintWriter(_socket.getOutputStream()); |
43 |
|
_logger.write(toString(), Logger.SYSINIT, "created"); |
45 |
|
|
46 |
|
//---PUBLIC METHODS--- |
47 |
|
|
48 |
+ |
/** |
49 |
+ |
* Main method in this class, which handles communicating with |
50 |
+ |
* the host to determine it's setup. |
51 |
+ |
*/ |
52 |
|
public void run() { |
53 |
|
try { |
54 |
|
String inBound = _socketIn.readLine(); |
178 |
|
public String toString() { |
179 |
|
return FormatName.getName( |
180 |
|
_name, |
181 |
< |
this.getClass().getName(), |
181 |
> |
getClass().getName(), |
182 |
|
REVISION); |
183 |
|
} |
184 |
|
|