Move TestSessionNegotiator class to separate file
[netconf.git] / netconf / netconf-netty-util / src / test / java / org / opendaylight / netconf / nettyutil / TestSessionNegotiator.java
1 /*
2  * Copyright (c) 2018 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.netconf.nettyutil;
10
11 import io.netty.channel.Channel;
12 import io.netty.util.Timer;
13 import io.netty.util.concurrent.Promise;
14 import org.opendaylight.netconf.api.NetconfDocumentedException;
15 import org.opendaylight.netconf.api.NetconfSessionListener;
16 import org.opendaylight.netconf.api.NetconfSessionPreferences;
17 import org.opendaylight.netconf.api.messages.NetconfHelloMessage;
18
19 final class TestSessionNegotiator extends
20     AbstractNetconfSessionNegotiator<NetconfSessionPreferences,
21         TestingNetconfSession, NetconfSessionListener<TestingNetconfSession>> {
22
23
24     TestSessionNegotiator(final NetconfSessionPreferences sessionPreferences,
25                           final Promise<TestingNetconfSession> promise, final Channel channel,
26                           final Timer timer,
27                           final NetconfSessionListener<TestingNetconfSession> sessionListener,
28                           final long connectionTimeoutMillis) {
29         super(sessionPreferences, promise, channel, timer, sessionListener, connectionTimeoutMillis);
30     }
31
32     @Override
33     protected TestingNetconfSession getSession(final NetconfSessionListener sessionListener, final Channel channel,
34                                                final NetconfHelloMessage message)
35         throws NetconfDocumentedException {
36         return new TestingNetconfSession(sessionListener, channel, 0L);
37     }
38
39     @Override
40     protected void handleMessage(final NetconfHelloMessage netconfHelloMessage) throws Exception {
41
42     }
43 }