|
@ -21,11 +21,11 @@ public class SimpleClientHandler extends ChannelInboundHandlerAdapter{ |
|
|
private IThermalImageryService thermalImageryService; |
|
|
private IThermalImageryService thermalImageryService; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { |
|
|
public void channelRead(ChannelHandlerContext ctx, Object msg) { |
|
|
if (msg instanceof ByteBuf) { |
|
|
if (msg instanceof ByteBuf) { |
|
|
String value = ((ByteBuf) msg).toString(Charset.defaultCharset()); |
|
|
String value = ((ByteBuf) msg).toString(Charset.defaultCharset()); |
|
|
System.out.println("服务器端返回的数据:" + value); |
|
|
System.out.println("服务器端返回的数据:" + value); |
|
|
if(StrUtil.isNotEmpty(value)) { |
|
|
if(StrUtil.isNotEmpty(value) && value.lastIndexOf("not online") == -1) { |
|
|
thermalImageryService.disposeMessage(value); |
|
|
thermalImageryService.disposeMessage(value); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|