X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-ssh%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fnetty%2FProxyServer.java;h=b465e381f2be3d862a59ba9dd1ce6353065205a0;hb=7072e63a98485bbbfa686a639d28002377972aa0;hp=ee34f8fd2f1ad2acbf4a746f1794bc140513563d;hpb=53646a063c2ec4251bb4f9d02a4ff488956a0dcc;p=netconf.git diff --git a/netconf/netconf-ssh/src/test/java/org/opendaylight/netconf/netty/ProxyServer.java b/netconf/netconf-ssh/src/test/java/org/opendaylight/netconf/netty/ProxyServer.java index ee34f8fd2f..b465e381f2 100644 --- a/netconf/netconf-ssh/src/test/java/org/opendaylight/netconf/netty/ProxyServer.java +++ b/netconf/netconf-ssh/src/test/java/org/opendaylight/netconf/netty/ProxyServer.java @@ -21,7 +21,7 @@ import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; import java.net.InetSocketAddress; -import org.opendaylight.netconf.util.osgi.NetconfConfiguration; +import org.opendaylight.netconf.util.NetconfConfiguration; public class ProxyServer implements Runnable { private final ProxyHandlerFactory proxyHandlerFactory; @@ -30,6 +30,7 @@ public class ProxyServer implements Runnable { this.proxyHandlerFactory = proxyHandlerFactory; } + @SuppressWarnings("checkstyle:IllegalCatch") public void run() { // Configure the server. final EventLoopGroup bossGroup = new NioEventLoopGroup(); @@ -50,10 +51,10 @@ public class ProxyServer implements Runnable { // Start the server. InetSocketAddress address = new InetSocketAddress("127.0.0.1", 8080); - ChannelFuture f = serverBootstrap.bind(address).sync(); + ChannelFuture future = serverBootstrap.bind(address).sync(); // Wait until the server socket is closed. - f.channel().closeFuture().sync(); + future.channel().closeFuture().sync(); } catch (Exception e) { throw new RuntimeException(e); } finally { @@ -62,7 +63,8 @@ public class ProxyServer implements Runnable { workerGroup.shutdownGracefully(); } } - public static interface ProxyHandlerFactory { + + public interface ProxyHandlerFactory { ChannelHandler create(EventLoopGroup bossGroup, LocalAddress localAddress); }