|
|
@@ -0,0 +1,484 @@
|
|
|
+package com.mes.test;
|
|
|
+
|
|
|
+import com.mes.ui.YgslUtil;
|
|
|
+import com.mes.ygsl.YgslClient;
|
|
|
+import io.netty.bootstrap.Bootstrap;
|
|
|
+import io.netty.buffer.ByteBuf;
|
|
|
+import io.netty.buffer.Unpooled;
|
|
|
+import io.netty.channel.*;
|
|
|
+import io.netty.channel.nio.NioEventLoopGroup;
|
|
|
+import io.netty.channel.socket.SocketChannel;
|
|
|
+import io.netty.channel.socket.nio.NioSocketChannel;
|
|
|
+import io.netty.handler.codec.DelimiterBasedFrameDecoder;
|
|
|
+import io.netty.handler.codec.string.StringEncoder;
|
|
|
+import io.netty.util.CharsetUtil;
|
|
|
+
|
|
|
+import java.util.Scanner;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
+
|
|
|
+public class YgslUtilTest {
|
|
|
+
|
|
|
+ private static YgslClient ygslClient;
|
|
|
+ private static Scanner scanner;
|
|
|
+ private static volatile boolean connected = false;
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ scanner = new Scanner(System.in);
|
|
|
+
|
|
|
+ System.out.println("========================================");
|
|
|
+ System.out.println(" A枪工具类测试工具");
|
|
|
+ System.out.println("========================================");
|
|
|
+ System.out.println("设备IP: 192.168.100.121");
|
|
|
+ System.out.println("设备端口: 4545");
|
|
|
+ System.out.println("========================================");
|
|
|
+
|
|
|
+ while (true) {
|
|
|
+ System.out.println("\n请选择操作:");
|
|
|
+ System.out.println("1. 连接设备");
|
|
|
+ System.out.println("2. 断开连接");
|
|
|
+ System.out.println("3. 通讯启动 (comStart)");
|
|
|
+ System.out.println("4. 通讯停止 (comStop)");
|
|
|
+ System.out.println("5. 心跳测试 (comHeart)");
|
|
|
+ System.out.println("6. 使能工具 (enableTool)");
|
|
|
+ System.out.println("7. 禁用工具 (disableTool)");
|
|
|
+ System.out.println("8. 订阅拧紧结果 (lastTighteningResultSubscribe)");
|
|
|
+ System.out.println("9. 设置pSet (pSet)");
|
|
|
+ System.out.println("10. 选择set (selectSet)");
|
|
|
+ System.out.println("11. 上传jobId (jobIdUpload)");
|
|
|
+ System.out.println("12. 选择job (selectJob)");
|
|
|
+ System.out.println("13. 重启job (restartJob)");
|
|
|
+ System.out.println("14. 自动测试序列");
|
|
|
+ System.out.println("0. 退出");
|
|
|
+ System.out.println("========================================");
|
|
|
+
|
|
|
+ System.out.print("\n请输入选项: ");
|
|
|
+ String input = scanner.nextLine().trim();
|
|
|
+
|
|
|
+ if (!connected && !input.equals("1") && !input.equals("0")) {
|
|
|
+ System.out.println("请先连接设备(选项1)!");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (input) {
|
|
|
+ case "1":
|
|
|
+ connectDevice();
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ disconnectDevice();
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ testComStart();
|
|
|
+ break;
|
|
|
+ case "4":
|
|
|
+ testComStop();
|
|
|
+ break;
|
|
|
+ case "5":
|
|
|
+ testComHeart();
|
|
|
+ break;
|
|
|
+ case "6":
|
|
|
+ testEnableTool();
|
|
|
+ break;
|
|
|
+ case "7":
|
|
|
+ testDisableTool();
|
|
|
+ break;
|
|
|
+ case "8":
|
|
|
+ testLastTighteningResultSubscribe();
|
|
|
+ break;
|
|
|
+ case "9":
|
|
|
+ testPSet();
|
|
|
+ break;
|
|
|
+ case "10":
|
|
|
+ testSelectSet();
|
|
|
+ break;
|
|
|
+ case "11":
|
|
|
+ testJobIdUpload();
|
|
|
+ break;
|
|
|
+ case "12":
|
|
|
+ testSelectJob();
|
|
|
+ break;
|
|
|
+ case "13":
|
|
|
+ testRestartJob();
|
|
|
+ break;
|
|
|
+ case "14":
|
|
|
+ runAutoTestSequence();
|
|
|
+ break;
|
|
|
+ case "0":
|
|
|
+ System.out.println("退出测试程序");
|
|
|
+ disconnectDevice();
|
|
|
+ scanner.close();
|
|
|
+ System.exit(0);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ System.out.println("无效选项,请重新输入");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void connectDevice() {
|
|
|
+ if (connected) {
|
|
|
+ System.out.println("设备已连接");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ System.out.println("\n========================================");
|
|
|
+ System.out.println("正在连接设备...");
|
|
|
+ System.out.println("========================================");
|
|
|
+
|
|
|
+ EventLoopGroup group = new NioEventLoopGroup();
|
|
|
+ Bootstrap bootstrap = new Bootstrap();
|
|
|
+
|
|
|
+ try {
|
|
|
+ bootstrap.group(group)
|
|
|
+ .channel(NioSocketChannel.class)
|
|
|
+ .option(ChannelOption.TCP_NODELAY, true)
|
|
|
+ .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000)
|
|
|
+ .option(ChannelOption.SO_KEEPALIVE, true)
|
|
|
+ .handler(new ChannelInitializer<SocketChannel>() {
|
|
|
+ protected void initChannel(SocketChannel socketChannel) throws Exception {
|
|
|
+ ByteBuf delimiter = Unpooled.copiedBuffer(new byte[]{0x00});
|
|
|
+ socketChannel.pipeline()
|
|
|
+ .addLast(new DelimiterBasedFrameDecoder(1024, delimiter))
|
|
|
+ .addLast("encoder", new StringEncoder(CharsetUtil.UTF_8))
|
|
|
+ .addLast(new SimpleChannelInboundHandler<String>() {
|
|
|
+ @Override
|
|
|
+ protected void channelRead0(ChannelHandlerContext ctx, String msg) {
|
|
|
+ handleServerResponse(msg);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void channelActive(ChannelHandlerContext ctx) {
|
|
|
+ System.out.println("✓ 设备连接成功!");
|
|
|
+ System.out.println(" 本地地址: " + ctx.channel().localAddress());
|
|
|
+ System.out.println(" 远程地址: " + ctx.channel().remoteAddress());
|
|
|
+ connected = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void channelInactive(ChannelHandlerContext ctx) {
|
|
|
+ System.out.println("✗ 设备连接断开");
|
|
|
+ connected = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
|
|
|
+ System.out.println("✗ 连接异常: " + cause.getMessage());
|
|
|
+ cause.printStackTrace();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .remoteAddress("192.168.100.121", 4545);
|
|
|
+
|
|
|
+ ChannelFuture future = bootstrap.connect().sync();
|
|
|
+ ygslClient = new YgslClient();
|
|
|
+ ygslClient.future = future;
|
|
|
+ ygslClient.socketChannel = (SocketChannel) future.channel();
|
|
|
+
|
|
|
+ System.out.println("✓ TCP连接建立成功");
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ System.out.println("✗ 连接失败: " + e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void disconnectDevice() {
|
|
|
+ if (!connected || ygslClient == null) {
|
|
|
+ System.out.println("设备未连接");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ ygslClient.future.channel().close().sync();
|
|
|
+ System.out.println("✓ 设备已断开连接");
|
|
|
+ connected = false;
|
|
|
+ } catch (Exception e) {
|
|
|
+ System.out.println("✗ 断开连接失败: " + e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void handleServerResponse(String msg) {
|
|
|
+ waitingForReply = false;
|
|
|
+
|
|
|
+ System.out.println("\n========================================");
|
|
|
+ System.out.println("收到服务器回复");
|
|
|
+ System.out.println("========================================");
|
|
|
+ System.out.println("原始数据: " + msg);
|
|
|
+ System.out.println("数据长度: " + msg.length());
|
|
|
+ System.out.println("十六进制: " + stringToHex(msg));
|
|
|
+
|
|
|
+ if (msg.length() >= 4) {
|
|
|
+ String mid = msg.substring(0, 4);
|
|
|
+ System.out.println("MID (消息ID): " + mid);
|
|
|
+
|
|
|
+ switch (mid) {
|
|
|
+ case "0002":
|
|
|
+ System.out.println("消息类型: 通讯启动确认");
|
|
|
+ break;
|
|
|
+ case "0004":
|
|
|
+ System.out.println("消息类型: 命令错误");
|
|
|
+ if (msg.length() >= 8) {
|
|
|
+ String errorCode = msg.substring(4, 8);
|
|
|
+ System.out.println("错误代码: " + errorCode);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "0005":
|
|
|
+ System.out.println("消息类型: 命令被接受");
|
|
|
+ if (msg.length() >= 8) {
|
|
|
+ String replyMid = msg.substring(4, 8);
|
|
|
+ System.out.println("回复的MID: " + replyMid);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "0010":
|
|
|
+ System.out.println("消息类型: pSet确认");
|
|
|
+ break;
|
|
|
+ case "0011":
|
|
|
+ System.out.println("消息类型: 选择set确认");
|
|
|
+ break;
|
|
|
+ case "0031":
|
|
|
+ System.out.println("消息类型: 选择job确认");
|
|
|
+ break;
|
|
|
+ case "0061":
|
|
|
+ System.out.println("消息类型: 拧紧数据上报");
|
|
|
+ System.out.println("这是拧紧结果数据,包含扭矩、角度等信息");
|
|
|
+ break;
|
|
|
+ case "0099":
|
|
|
+ System.out.println("消息类型: 心跳回复");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ System.out.println("消息类型: 未知");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ System.out.println("========================================");
|
|
|
+ }
|
|
|
+
|
|
|
+ private static String stringToHex(String input) {
|
|
|
+ StringBuilder hexString = new StringBuilder();
|
|
|
+ for (char ch : input.toCharArray()) {
|
|
|
+ hexString.append(String.format("%02X", (int) ch));
|
|
|
+ }
|
|
|
+ return hexString.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testComStart() {
|
|
|
+ System.out.println("\n>>> 发送命令: 通讯启动 (comStart)");
|
|
|
+ System.out.println("预期回复: 0002 (通讯启动确认)");
|
|
|
+ String cmd = "002000010050 ";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.comStart(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testComStop() {
|
|
|
+ System.out.println("\n>>> 发送命令: 通讯停止 (comStop)");
|
|
|
+ System.out.println("预期回复: 0005 (命令被接受) 或 0004 (命令错误)");
|
|
|
+ String cmd = "002000030050 ";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.comStop(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testComHeart() {
|
|
|
+ System.out.println("\n>>> 发送命令: 心跳 (comHeart)");
|
|
|
+ System.out.println("预期回复: 0099 (心跳回复)");
|
|
|
+ String cmd = "002099990010 ";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.comHeart(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testEnableTool() {
|
|
|
+ System.out.println("\n>>> 发送命令: 使能工具 (enableTool)");
|
|
|
+ System.out.println("预期回复: 0005 (命令被接受) 或 0004 (命令错误)");
|
|
|
+ String cmd = "00200043000 ";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.enableTool(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testDisableTool() {
|
|
|
+ System.out.println("\n>>> 发送命令: 禁用工具 (disableTool)");
|
|
|
+ System.out.println("预期回复: 0005 (命令被接受) 或 0004 (命令错误)");
|
|
|
+ String cmd = "00200042000 ";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.disableTool(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testLastTighteningResultSubscribe() {
|
|
|
+ System.out.println("\n>>> 发送命令: 订阅拧紧结果 (lastTighteningResultSubscribe)");
|
|
|
+ System.out.println("预期回复: 0061 (拧紧数据上报)");
|
|
|
+ String cmd = "002000600010 ";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.lastTighteningResultSubscribe(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testPSet() {
|
|
|
+ System.out.println("\n>>> 发送命令: 设置pSet (pSet)");
|
|
|
+ System.out.println("预期回复: 0010 (pSet确认)");
|
|
|
+ String cmd = "002000100010 ";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.pSet(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testSelectSet() {
|
|
|
+ System.out.println("\n>>> 发送命令: 选择set (selectSet)");
|
|
|
+ System.out.println("预期回复: 0011 (选择set确认)");
|
|
|
+ String cmd = "002300180010 001";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.selectSet(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testJobIdUpload() {
|
|
|
+ System.out.println("\n>>> 发送命令: 上传jobId (jobIdUpload)");
|
|
|
+ System.out.println("预期回复: 0031 (选择job确认)");
|
|
|
+ String cmd = "002000300010 ";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.jobIdUpload(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testSelectJob() {
|
|
|
+ System.out.println("\n>>> 发送命令: 选择job (selectJob)");
|
|
|
+ System.out.println("预期回复: 0031 (选择job确认)");
|
|
|
+ String cmd = "002000380010 01";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.selectJob(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void testRestartJob() {
|
|
|
+ System.out.println("\n>>> 发送命令: 重启job (restartJob)");
|
|
|
+ System.out.println("预期回复: 0005 (命令被接受) 或 0004 (命令错误)");
|
|
|
+ String cmd = "002000390010 01";
|
|
|
+ System.out.println("发送的原始字符串: " + cmd);
|
|
|
+ System.out.println("发送的十六进制: " + stringToHex(cmd));
|
|
|
+ System.out.println("发送的字节数: " + cmd.length());
|
|
|
+ Boolean result = YgslUtil.restartJob(ygslClient);
|
|
|
+ System.out.println("发送结果: " + (result ? "成功" : "失败"));
|
|
|
+ System.out.println("等待回复(最多5秒)...");
|
|
|
+ startReplyTimeoutMonitor(5000);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static volatile boolean waitingForReply = false;
|
|
|
+
|
|
|
+ private static void startReplyTimeoutMonitor(long timeoutMs) {
|
|
|
+ waitingForReply = true;
|
|
|
+ new Thread(() -> {
|
|
|
+ try {
|
|
|
+ Thread.sleep(timeoutMs);
|
|
|
+ if (waitingForReply) {
|
|
|
+ System.out.println("\n⚠ 超时警告: " + timeoutMs + "ms内未收到服务器回复");
|
|
|
+ System.out.println("可能的原因:");
|
|
|
+ System.out.println(" 1. 设备未收到命令");
|
|
|
+ System.out.println(" 2. 设备处理时间过长");
|
|
|
+ System.out.println(" 3. 设备回复格式不正确");
|
|
|
+ System.out.println(" 4. 网络传输问题");
|
|
|
+ System.out.println(" 5. 设备不支持该命令");
|
|
|
+ waitingForReply = false;
|
|
|
+ }
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ Thread.currentThread().interrupt();
|
|
|
+ }
|
|
|
+ }).start();
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void runAutoTestSequence() {
|
|
|
+ System.out.println("\n========================================");
|
|
|
+ System.out.println("开始自动测试序列");
|
|
|
+ System.out.println("========================================");
|
|
|
+
|
|
|
+ if (!connected) {
|
|
|
+ System.out.println("请先连接设备!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ System.out.println("\n步骤1: 通讯启动");
|
|
|
+ testComStart();
|
|
|
+ sleep(1000);
|
|
|
+
|
|
|
+ System.out.println("\n步骤2: 订阅拧紧结果");
|
|
|
+ testLastTighteningResultSubscribe();
|
|
|
+ sleep(1000);
|
|
|
+
|
|
|
+ System.out.println("\n步骤3: 设置pSet");
|
|
|
+ testPSet();
|
|
|
+ sleep(1000);
|
|
|
+
|
|
|
+ System.out.println("\n步骤4: 选择set");
|
|
|
+ testSelectSet();
|
|
|
+ sleep(1000);
|
|
|
+
|
|
|
+ System.out.println("\n步骤5: 上传jobId");
|
|
|
+ testJobIdUpload();
|
|
|
+ sleep(1000);
|
|
|
+
|
|
|
+ System.out.println("\n步骤6: 选择job");
|
|
|
+ testSelectJob();
|
|
|
+ sleep(1000);
|
|
|
+
|
|
|
+ System.out.println("\n步骤7: 使能工具");
|
|
|
+ testEnableTool();
|
|
|
+ sleep(1000);
|
|
|
+
|
|
|
+ System.out.println("\n步骤8: 发送心跳");
|
|
|
+ testComHeart();
|
|
|
+ sleep(1000);
|
|
|
+
|
|
|
+ System.out.println("\n========================================");
|
|
|
+ System.out.println("自动测试序列完成");
|
|
|
+ System.out.println("========================================");
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void sleep(long millis) {
|
|
|
+ try {
|
|
|
+ Thread.sleep(millis);
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ Thread.currentThread().interrupt();
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|