@Override public SessionNegotiator<NetconfClientSession> getSessionNegotiator(final SessionListenerFactory<NetconfClientSessionListener> sessionListenerFactory, final Channel channel, final Promise<NetconfClientSession> promise) { NetconfMessage startExiMessage = NetconfStartExiMessage.create(options, START_EXI_MESSAGE_ID); NetconfHelloMessage helloMessage = null; try { helloMessage = NetconfHelloMessage.createClientHello(clientCapabilities, additionalHeader); } catch (NetconfDocumentedException e) { LOG.error("Unable to create client hello message with capabilities {} and additional handler {}", clientCapabilities,additionalHeader); throw new IllegalStateException(e); } NetconfClientSessionPreferences proposal = new NetconfClientSessionPreferences(helloMessage, startExiMessage); return new NetconfClientSessionNegotiator(proposal, promise, channel, timer, sessionListenerFactory.getSessionListener(),connectionTimeoutMillis); } }