Package io.netty.channel

Examples of io.netty.channel.EventLoopGroup.shutdownGracefully()


            allChannels.add(f.channel());
            allChannels.close().awaitUninterruptibly();
        }

        bossGroup.shutdownGracefully();
        workerGroup.shutdownGracefully();
        bossGroup.terminationFuture().sync();
        workerGroup.terminationFuture().sync();
    }
}
View Full Code Here


                    break;
                }
                Assert.assertEquals(event, expectedEvents.poll());
            }
        } finally {
            l.shutdownGracefully();
            e1.shutdownGracefully();
            e2.shutdownGracefully();
            e3.shutdownGracefully();
            e4.shutdownGracefully();
            e5.shutdownGracefully();
View Full Code Here

            System.err.println("If using Chrome browser, check your SPDY sessions at chrome://net-internals/#spdy");

            ch.closeFuture().sync();
        } finally {
            bossGroup.shutdownGracefully();
            workerGroup.shutdownGracefully();
        }
    }
}
View Full Code Here

            System.out.println("H1R: " + h1.removalThreadNames);
            System.out.println("H2R: " + h2.removalThreadNames);
            System.out.println("H3R: " + h3.removalThreadNames);
            throw e;
        } finally {
            l.shutdownGracefully();
            e1.shutdownGracefully();
            e2.shutdownGracefully();

            l.terminationFuture().sync();
            e1.terminationFuture().sync();
View Full Code Here

                    (SSL? "https" : "http") + "://127.0.0.1:" + PORT + '/');

            ch.closeFuture().sync();
        } finally {
            bossGroup.shutdownGracefully();
            workerGroup.shutdownGracefully();
        }
    }
}
View Full Code Here

                Thread.sleep(10);
            }

            ch.close().sync();
        } finally {
            l0.shutdownGracefully();
            e1.shutdownGracefully();
            e2.shutdownGracefully();
            e3.shutdownGracefully();
            e4.shutdownGracefully();
            e5.shutdownGracefully();
View Full Code Here

            latch.await();

            // Close the channel
            cc.close().sync();

            serverGroup.shutdownGracefully();
            clientGroup.shutdownGracefully();

            sc.closeFuture().sync();

            assertNull(String.format(
View Full Code Here

                        e.getStackTrace()[0].getClassName(), is(AbstractChannel.class.getName() + "$AbstractUnsafe"));
                e.printStackTrace();
            }
        }

        serverGroup.shutdownGracefully();
        clientGroup.shutdownGracefully();
        serverGroup.terminationFuture().sync();
        clientGroup.terminationFuture().sync();
    }
View Full Code Here

                    }
                });
        Channel channel = b.connect(addr).sync().channel();
        channel.writeAndFlush(new Object());
        latch.await();
        group.shutdownGracefully();
        group.terminationFuture().sync();
    }

    @Test
    public void localChannelRaceCondition() throws Exception {
View Full Code Here

                    });
            ChannelFuture future = bootstrap.connect(address);
            assertTrue("Connection should finish, not time out", future.await(200));
        } finally {
            serverGroup.shutdownGracefully(0, 0, TimeUnit.SECONDS).await();
            clientGroup.shutdownGracefully(0, 0, TimeUnit.SECONDS).await();
        }
    }

    @Test
    public void testReRegister() {
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.