AbstractNetconfSessionNegotiator uses only NetconfHelloMessage
[netconf.git] / netconf / netconf-netty-util / src / test / java / org / opendaylight / netconf / nettyutil / TestSessionNegotiator.java
index d5e895515b2f2bb50ca1bf29605b6a08b652def3..61be232134df2b8fba5de6958b688403470afae9 100644 (file)
@@ -5,39 +5,30 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.netconf.nettyutil;
 
 import io.netty.channel.Channel;
 import io.netty.util.Timer;
 import io.netty.util.concurrent.Promise;
-import org.opendaylight.netconf.api.NetconfDocumentedException;
 import org.opendaylight.netconf.api.NetconfSessionListener;
-import org.opendaylight.netconf.api.NetconfSessionPreferences;
 import org.opendaylight.netconf.api.messages.NetconfHelloMessage;
 
-final class TestSessionNegotiator extends
-    AbstractNetconfSessionNegotiator<NetconfSessionPreferences,
-        TestingNetconfSession, NetconfSessionListener<TestingNetconfSession>> {
-
-
-    TestSessionNegotiator(final NetconfSessionPreferences sessionPreferences,
-                          final Promise<TestingNetconfSession> promise, final Channel channel,
-                          final Timer timer,
-                          final NetconfSessionListener<TestingNetconfSession> sessionListener,
-                          final long connectionTimeoutMillis) {
-        super(sessionPreferences, promise, channel, timer, sessionListener, connectionTimeoutMillis);
+final class TestSessionNegotiator
+        extends AbstractNetconfSessionNegotiator<TestingNetconfSession, NetconfSessionListener<TestingNetconfSession>> {
+    TestSessionNegotiator(final NetconfHelloMessage hello, final Promise<TestingNetconfSession> promise,
+            final Channel channel, final Timer timer,
+            final NetconfSessionListener<TestingNetconfSession> sessionListener, final long connectionTimeoutMillis) {
+        super(hello, promise, channel, timer, sessionListener, connectionTimeoutMillis);
     }
 
     @Override
-    protected TestingNetconfSession getSession(final NetconfSessionListener sessionListener, final Channel channel,
-                                               final NetconfHelloMessage message)
-        throws NetconfDocumentedException {
+    protected TestingNetconfSession getSession(final NetconfSessionListener<TestingNetconfSession> sessionListener,
+            final Channel channel, final NetconfHelloMessage message) {
         return new TestingNetconfSession(sessionListener, channel, 0L);
     }
 
     @Override
-    protected void handleMessage(final NetconfHelloMessage netconfHelloMessage) throws Exception {
-
+    protected void handleMessage(final NetconfHelloMessage netconfHelloMessage) {
+        // No-op
     }
 }
\ No newline at end of file