Package org.jboss.netty.channel.group

Examples of org.jboss.netty.channel.group.ChannelGroupFuture.awaitUninterruptibly()


    logger.info("----------------------------------------------------");
    logger.info("-- socket server closing...");
    logger.info("-- channels count : " + allChannels.size());
    ChannelGroupFuture future = allChannels.close();
    logger.info("-- closing all channels...");
    future.awaitUninterruptibly();
    logger.info("-- closed all channels...");
    bootstrap.getFactory().releaseExternalResources();
    logger.info("-- released external resources");
    logger.info("-- close success !");
    logger.info("----------------------------------------------------");
View Full Code Here


    /**
     * Stop server
     */
    public void stop() {
        ChannelGroupFuture future = getChannelGroup().close();
        future.awaitUninterruptibly();
    }

}
View Full Code Here

    protected void doStop() throws Exception {
        LOG.debug("Stopping producer at address: {}", configuration.getAddress());
        // close all channels
        LOG.trace("Closing {} channels", ALL_CHANNELS.size());
        ChannelGroupFuture future = ALL_CHANNELS.close();
        future.awaitUninterruptibly();

        // and then release other resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

        if (LOG.isDebugEnabled()) {
            LOG.debug("Stopping producer at address: " + configuration.getAddress());
        }
        // close all channels
        ChannelGroupFuture future = ALL_CHANNELS.close();
        future.awaitUninterruptibly();

        // and then release other resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

            LOG.debug("Netty consumer unbinding from: " + configuration.getAddress());
        }

        // close all channels
        ChannelGroupFuture future = allChannels.close();
        future.awaitUninterruptibly();

        // and then release other resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

     */
    private void handleShutdown() {
        try {
            l.info("Stopping the gateway.");
            ChannelGroupFuture shutdown = allChannels.close();
            shutdown.awaitUninterruptibly();
            factory.releaseExternalResources();
            l.info("Stopped the gateway.");
        } finally {
            shutdownListener.notifyShutdown();
        }
View Full Code Here

    protected void doStop() throws Exception {
        LOG.debug("Stopping producer at address: {}", configuration.getAddress());
        // close all channels
        LOG.trace("Closing {} channels", ALL_CHANNELS.size());
        ChannelGroupFuture future = ALL_CHANNELS.close();
        future.awaitUninterruptibly();

        // and then release other resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

    protected void doStop() throws Exception {
        LOG.debug("Stopping producer at address: {}", configuration.getAddress());
        // close all channels
        LOG.trace("Closing {} channels", ALL_CHANNELS.size());
        ChannelGroupFuture future = ALL_CHANNELS.close();
        future.awaitUninterruptibly();

        // and then release other resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

        LOG.debug("Netty consumer unbinding from: {}", configuration.getAddress());

        // close all channels
        LOG.trace("Closing {} channels", allChannels.size());
        ChannelGroupFuture future = allChannels.close();
        future.awaitUninterruptibly();

        // close server external resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

  }
 
  @Override
  public void close() {
    ChannelGroupFuture future = allChannels.close();
    future.awaitUninterruptibly();
    channelFactory.releaseExternalResources();
    closed.countDown();
  }
 
  @Override
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.