Package io.netty.bootstrap

Examples of io.netty.bootstrap.ServerBootstrap.shutdown()


            //closeFuture.sync();
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } finally {
            bootstrap.shutdown();
        }
    }

    /**
     * {@inheritedDoc}
 
View Full Code Here


          .childHandler(new DispatcherServletChannelInitializer());

      server.bind().sync().channel().closeFuture().sync();
    }
    finally {
      server.shutdown();
    }
  }

  public static void main(String[] args) throws Exception {
    int port;
View Full Code Here

            // Wait until the server socket is closed.
            f.channel().closeFuture().sync();
        } finally {
            // Shut down all event loops to terminate all threads.
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        int port;
View Full Code Here

            // Wait until the server socket is closed.
            // In this example, this does not happen, but you can do that to gracefully
            // shut down your server.
            f.channel().closeFuture().sync();
        } finally {
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        int port;
View Full Code Here

            b.group(new NioEventLoopGroup(), new NioEventLoopGroup())
                    .channel(NioServerSocketChannel.class)
                    .childHandler(new SocksServerInitializer());
            b.bind(localPort).sync().channel().closeFuture().sync();
        } finally {
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        new SocksServer(1080).run();
View Full Code Here

            // Wait until all messages are flushed before closing the channel.
            if (lastWriteFuture != null) {
                lastWriteFuture.awaitUninterruptibly();
            }
        } finally {
            sb.shutdown();
            cb.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
View Full Code Here

             .channel(NioServerSocketChannel.class)
             .childHandler(new HttpStaticFileServerInitializer());

            b.bind(port).sync().channel().closeFuture().sync();
        } finally {
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        int port;
View Full Code Here

             .channel(NioServerSocketChannel.class)
             .childHandler(new HexDumpProxyInitializer(remoteHost, remotePort))
             .childOption(ChannelOption.AUTO_READ, false)
             .bind(localPort).sync().channel().closeFuture().sync();
        } finally {
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        // Validate command line options.
View Full Code Here

            });

            // Bind and start to accept incoming connections.
            b.bind(port).sync().channel().closeFuture().sync();
        } finally {
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        int port;
View Full Code Here

             .channel(NioServerSocketChannel.class)
             .childHandler(new FactorialServerInitializer());

            b.bind(port).sync().channel().closeFuture().sync();
        } finally {
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        int port;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.