@Override
public void channelRead(final ChannelHandlerContext ctx, final Object msg) throws Exception {
ctx.pipeline().remove(ExiConfirmationInboundHandler.EXI_CONFIRMED_HANDLER);
NetconfMessage netconfMessage = (NetconfMessage) msg;
if (NetconfMessageUtil.isOKMessage(netconfMessage)) {
LOG.trace("Positive response on start-exi call received on session {}", session);
try {
session.startExiCommunication(startExiMessage);
} catch (RuntimeException e) {
LOG.warn("Unable to start exi communication, Communication will continue without exi on session {}", session, e);
}
} else if(NetconfMessageUtil.isErrorMessage(netconfMessage)) {
LOG.warn(
"Error response to start-exi message {}, Communication will continue without exi on session {}",
netconfMessage, session);
} else {
LOG.warn("Unexpected response to start-exi message, should be ok, was {}, " +
"Communication will continue without exi and response message will be thrown away on session {}",
netconfMessage, session);
}
negotiationSuccessful(session);
}
}