267
|
1 package alice.topology.manager.reconnection;
|
|
2
|
|
3 import java.io.IOException;
|
|
4 import java.net.Socket;
|
|
5 import alice.codesegment.CodeSegment;
|
|
6 import alice.datasegment.CommandType;
|
|
7 import alice.datasegment.Receiver;
|
|
8 import alice.topology.HostMessage;
|
|
9
|
268
|
10 public class ReceiveError extends CodeSegment {
|
267
|
11 public Receiver reportInfo = ids.create(CommandType.TAKE);
|
|
12
|
268
|
13 public ReceiveError(){
|
267
|
14 reportInfo.setKey("_ERROR");
|
|
15 }
|
|
16
|
|
17 @Override
|
|
18 public void run() {
|
269
|
19 System.out.println("run Receive Error");
|
267
|
20 HostMessage message = reportInfo.asClass(HostMessage.class);
|
|
21 try {
|
|
22 Socket socket = new Socket(message.name, message.port);
|
|
23 socket.close();
|
|
24 } catch (IOException e) {
|
270
|
25 System.out.println("Erorr");
|
|
26 System.out.println(message.name);
|
|
27 System.out.println(message.port);
|
268
|
28 new CheckABSName(message);
|
|
29 return;
|
267
|
30 }
|
268
|
31 new ReceiveError();
|
267
|
32 }
|
|
33
|
|
34 }
|