Examples of shutdownGracefully()


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

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

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

            // Multipart Post form: factory used
            formpostmultipart(b, host, port, uriFile, factory, headers, bodylist);
        } finally {
            // Shut down executor threads to exit.
            group.shutdownGracefully();

            // Really clean all temporary files if they still exist
            factory.cleanAllHttpData();
        }
    }
View Full Code Here

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

                    WebSocketFrame frame = new TextWebSocketFrame(msg);
                    ch.writeAndFlush(frame);
                }
            }
        } finally {
            group.shutdownGracefully();
        }
    }
}
View Full Code Here

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

        } finally {
            logger.info("Shutting down thread pools");

            gremlinGroup.shutdownGracefully();
            bossGroup.shutdownGracefully();
            workerGroup.shutdownGracefully();

            logger.info("Gremlin Server - shutdown complete");
        }
    }
View Full Code Here

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

            // Multipart Post form: factory used
            formpostmultipart(b, host, port, uriFile, factory, headers, bodylist);
        } finally {
            // Shut down executor threads to exit.
            group.shutdownGracefully();

            // Really clean all temporary files if they still exist
            factory.cleanAllHttpDatas();
        }
    }
View Full Code Here

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

            // In this example, this does not happen, but you can do that to gracefully
            // shut down your server.
            f.channel().closeFuture().sync();
        } finally {
            this.state = ServerState.STOPPING;
            workerGroup.shutdownGracefully();
            bossGroup.shutdownGracefully();
        }
    }

    public enum ServerState {
View Full Code Here

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

            if (lastWriteFuture != null) {
                lastWriteFuture.awaitUninterruptibly();
            }
        } finally {
            serverGroup.shutdownGracefully();
            clientGroup.shutdownGracefully();
        }
    }
}
View Full Code Here

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

                        // remember folks, this is blocking.
                        log.info(String.format("Binding to %s", addr.toString()));
                        bootstrap.bind(addr).sync().channel().closeFuture().await();
                       
                    } finally {
                        group.shutdownGracefully();
                        running.set(false);
                    }
                } catch (Exception ex) {
                    running.set(false);
                    log.error(ex.getMessage(), ex);
View Full Code Here

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

                    }
                }

                @Override
                public boolean cancel() {
                    group.shutdownGracefully();
                    return true;
                }
            };

            // set things in motion.
View Full Code Here

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

      Channel ch = b.bind(fw.host, fw.port).sync().channel();
      ch.closeFuture().sync();
    } finally {
      bossGroup.shutdownGracefully();
      workerGroup.shutdownGracefully();
    }
  }


}
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.