}
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
try {
NettyDataPack dataPack = (NettyDataPack) e.getMessage();
List<ByteBuffer> req = dataPack.getDatas();
List<ByteBuffer> res = responder.respond(req, connectionMetadata);
// response will be null for oneway messages.
if(res != null) {
dataPack.setDatas(res);
e.getChannel().write(dataPack);
}
} catch (IOException ex) {
LOG.warn("unexpect error");
}