| | |
| | | |
| | | import com.ld.igds.protocol.beibo.grain.analysis.AnalysisService; |
| | | import com.ld.igds.util.BytesUtil; |
| | | import com.ld.igds.util.SpringUtil; |
| | | import io.netty.channel.ChannelHandlerContext; |
| | | import io.netty.channel.SimpleChannelInboundHandler; |
| | | import io.netty.util.internal.logging.InternalLogger; |
| | |
| | | */ |
| | | |
| | | public class ClientHandler extends SimpleChannelInboundHandler<Object> { |
| | | @Autowired |
| | | |
| | | private AnalysisService analysisService; |
| | | private final InternalLogger log = InternalLoggerFactory.getInstance(this |
| | | .getClass()); |
| | | |
| | | private final InternalLogger log = InternalLoggerFactory.getInstance(this.getClass()); |
| | | |
| | | @Override |
| | | public void channelActive(ChannelHandlerContext ctx) { |
| | | InetSocketAddress insocket = (InetSocketAddress) ctx.channel() |
| | |
| | | InetSocketAddress insocket = (InetSocketAddress) ctx.channel().remoteAddress(); |
| | | |
| | | //解析 |
| | | if (null == analysisService) { |
| | | analysisService = (AnalysisService) SpringUtil.getBean(AnalysisService.BEAN_ID); |
| | | } |
| | | analysisService.analysis(result); |
| | | } |
| | | |