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;
this.proxyHandlerFactory = proxyHandlerFactory;
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
public void run() {
// Configure the server.
final EventLoopGroup bossGroup = new NioEventLoopGroup();
// 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 {
workerGroup.shutdownGracefully();
}
}
- public static interface ProxyHandlerFactory {
+
+ public interface ProxyHandlerFactory {
ChannelHandler create(EventLoopGroup bossGroup, LocalAddress localAddress);
}