@Override protected void channelRead0(ChannelHandlerContext ctx, CorfuMsg m) throws Exception { try { // We get the handler for this message from the map IClient handler = handlerMap.get(m.getMsgType()); if (handler == null) { // The message was unregistered, we are dropping it. log.warn("Received unregistered message {}, dropping", m); } else { if (validateClientId(m)) { // Route the message to the handler. if (log.isTraceEnabled()) { log.trace("Message routed to {}: {}", handler.getClass().getSimpleName(), m); } handler.handleMessage(m, ctx); } } } catch (Exception e) { log.error("Exception during read!", e); } }