Remove trailing whitespace
[openflowjava.git] / simple-client / src / main / java / org / opendaylight / openflowjava / protocol / impl / clients / SimpleClientInitializer.java
index d557c49beab2243a4f2dfddc793507a98eaaf183..a2fe3a117ae359de4a6b7652d17a65af5600fe98 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.openflowjava.protocol.impl.clients;
 
 import io.netty.channel.ChannelInitializer;
 import io.netty.channel.ChannelPipeline;
-import io.netty.channel.socket.SocketChannel;
+import io.netty.channel.socket.nio.NioSocketChannel;
 import io.netty.handler.ssl.SslHandler;
 
 import javax.net.ssl.SSLEngine;
@@ -19,11 +19,11 @@ import javax.net.ssl.SSLEngine;
 import com.google.common.util.concurrent.SettableFuture;
 
 /** Initializes secured {@link SimpleClient} pipeline
- * 
+ *
  * @author michal.polkorab
  */
-public class SimpleClientInitializer extends ChannelInitializer<SocketChannel> {
-    
+public class SimpleClientInitializer extends ChannelInitializer<NioSocketChannel> {
+
     private SettableFuture<Boolean> isOnlineFuture;
     private boolean secured;
     private ScenarioHandler scenarioHandler;
@@ -38,17 +38,17 @@ public class SimpleClientInitializer extends ChannelInitializer<SocketChannel> {
     }
 
     @Override
-    public void initChannel(SocketChannel ch) throws Exception {
+    public void initChannel(NioSocketChannel ch) throws Exception {
         ChannelPipeline pipeline = ch.pipeline();
         if (secured) {
             SSLEngine engine = ClientSslContextFactory.getClientContext()
                     .createSSLEngine();
             engine.setUseClientMode(true);
             pipeline.addLast("ssl", new SslHandler(engine));
-            pipeline.addLast("framer", new SimpleClientFramer());
         }
         SimpleClientHandler simpleClientHandler = new SimpleClientHandler(isOnlineFuture, scenarioHandler);
         simpleClientHandler.setScenario(scenarioHandler);
+        pipeline.addLast("framer", new SimpleClientFramer());
         pipeline.addLast("handler", simpleClientHandler);
         isOnlineFuture = null;