Package io.netty.bootstrap

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


            ChannelFuture f = b.connect(host, port).sync();

            // Wait until the connection is closed.
            f.channel().closeFuture().sync();
        } finally {
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        // Print usage if no argument is specified.
View Full Code Here


            if (lastWriteFuture != null) {
                lastWriteFuture.awaitUninterruptibly();
            }
        } finally {
            sb.shutdown();
            cb.shutdown();
        }
    }

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

             });

            // Start the connection attempt.
            b.connect(host, port).sync().channel().closeFuture().sync();
        } finally {
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        // Print usage if no argument is specified.
View Full Code Here

            final ChannelFuture f = boot.connect(peer, self).sync();
            // Wait until the connection is closed.
            f.channel().closeFuture().sync();
        } finally {
            // Shut down the event loop to terminate all threads.
            boot.shutdown();
        }
    }

}
View Full Code Here

            final ChannelFuture f = boot.connect(host, port).sync();
            // Wait until the connection is closed.
            f.channel().closeFuture().sync();
        } finally {
            // Shut down the event loop to terminate all threads.
            boot.shutdown();
        }
    }

    public static void main(final String[] args) throws Exception {
        log.info("init");
View Full Code Here

            // Print out the answer.
            System.err.format(
                    "Factorial of %,d is: %,d", count, handler.getFactorial());
        } finally {
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        // Print usage if no argument is specified.
View Full Code Here

            ChannelFuture f = b.connect(new RxtxDeviceAddress("/dev/ttyUSB0")).sync();

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

    private RxtxClient() {
    }
View Full Code Here

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

    public static void main(String[] args) throws Exception {
        // Print usage if no argument is specified.
View Full Code Here

                        }
                    });
            final ChannelFuture future = bootstrap.connect(peerAddress, myAddress).sync();
            future.channel().closeFuture().sync();
        } finally {
            bootstrap.shutdown();
        }
    }
}
View Full Code Here

        // Multipart Post form: factory used
        formPostMultipart(b, host, port, uriFile, factory, headers, bodylist);

        // Shut down executor threads to exit.
        b.shutdown();

        // Really clean all temporary files if they still exist
        factory.cleanAllHttpDatas();
    }
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.