2 * Copyright (c) 2018 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netconf.nettyutil;
10 import io.netty.channel.Channel;
11 import io.netty.util.Timer;
12 import io.netty.util.concurrent.Promise;
13 import org.opendaylight.netconf.api.NetconfSessionListener;
14 import org.opendaylight.netconf.api.messages.HelloMessage;
16 final class TestSessionNegotiator
17 extends AbstractNetconfSessionNegotiator<TestingNetconfSession, NetconfSessionListener<TestingNetconfSession>> {
18 TestSessionNegotiator(final HelloMessage hello, final Promise<TestingNetconfSession> promise,
19 final Channel channel, final Timer timer,
20 final NetconfSessionListener<TestingNetconfSession> sessionListener, final long connectionTimeoutMillis) {
21 super(hello, promise, channel, timer, sessionListener, connectionTimeoutMillis, 16384);
25 protected TestingNetconfSession getSession(final NetconfSessionListener<TestingNetconfSession> sessionListener,
26 final Channel channel, final HelloMessage message) {
27 return new TestingNetconfSession(sessionListener, channel, 0L);
31 protected void handleMessage(final HelloMessage netconfHelloMessage) {