Make use of new sendMessage method in AbstractNegotiator 93/5393/2
authorMaros Marsalek <mmarsale@cisco.com>
Tue, 18 Feb 2014 11:58:47 +0000 (12:58 +0100)
committerMaros Marsalek <mmarsale@cisco.com>
Thu, 20 Feb 2014 08:13:25 +0000 (09:13 +0100)
Change-Id: Ieeb104aa34b8140936a1daf8011ba3b0effc79d5
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/AbstractNetconfSessionNegotiator.java

index 7f2d8c3..71f0833 100644 (file)
@@ -123,7 +123,8 @@ extends AbstractSessionNegotiator<NetconfHelloMessage, S> {
             }
         }, connectionTimeoutMillis, TimeUnit.MILLISECONDS);
 
-        sendMessage(helloMessage);
+        // FIXME, make sessionPreferences return HelloMessage, move NetconfHelloMessage to API
+        sendMessage((NetconfHelloMessage)helloMessage);
         changeState(State.OPEN_WAIT);
     }
 
@@ -133,10 +134,6 @@ extends AbstractSessionNegotiator<NetconfHelloMessage, S> {
         }
     }
 
-    private void sendMessage(NetconfMessage message) {
-        this.channel.writeAndFlush(message);
-    }
-
     @Override
     protected void handleMessage(NetconfHelloMessage netconfMessage) {
         Preconditions.checkNotNull(netconfMessage != null, "netconfMessage");