Package org.jboss.netty.channel.group

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


    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


  @Override
  public void stop()
  {
    System.out.println("Shutting down");
    ChannelGroupFuture shutdown = _allChannels.disconnect();
    shutdown.awaitUninterruptibly();
    _bootstrap.releaseExternalResources();
    _executionHandler.releaseExternalResources();
  }

  @Override
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

    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

        running = true;
    }

    public void stop() {
        ChannelGroupFuture future = allChannels.close();
        future.awaitUninterruptibly();
        if (!future.isCompleteSuccess()) {
            System.err.println("shit");
        }
        channelFactory.releaseExternalResources();
        running = false;
View Full Code Here

    if (!loaded)
      return true;
   
    super.closedown();
    ChannelGroupFuture future = allTcpServerChannels.close();
    future.awaitUninterruptibly();
    if (channelFactory!=null)
      channelFactory.releaseExternalResources();
    allTcpServerChannels.clear();
    ports.clear();
    return true;
View Full Code Here

   * @see com.flipkart.phantom.runtime.impl.server.AbstractNetworkServer#doStopServer()
   */
  protected void doStopServer() throws RuntimeException {
    // close all channels registered with the default channel group
    ChannelGroupFuture future = this.defaultChannelGroup.close();
    future.awaitUninterruptibly();
    // close the pipleline factory and instruct the serverbootstrap to release external resources
    this.pipelineFactory.close();
    this.serverBootstrap.releaseExternalResources();
  }
 
View Full Code Here

    }
   
    public void stop()
    {
        ChannelGroupFuture future = allChannels.close();
        future.awaitUninterruptibly();
        channelFactory.releaseExternalResources();
        log.info( "SocketClient stopped" );
    }
}
View Full Code Here

  public void stop() throws Exception {
    logger.info("----------------------------------------------------");
    logger.info("-- telnet Server closing...");
    logger.info("-- channels count : " + allChannels.size());
    ChannelGroupFuture future = allChannels.close();
    future.awaitUninterruptibly();
    bootstrap.getFactory().releaseExternalResources();
    logger.info("-- close success !");
    logger.info("----------------------------------------------------");
  }
}
View Full Code Here

    logger.info("----------------------------------------------------");
    logger.info("-- http server closing...");
    logger.info("-- channels count : " + allChannels.size());
    ChannelGroupFuture future = allChannels.close();
    logger.info("-- closing all channels...");
    future.awaitUninterruptibly();
    bootstrap.getFactory().releaseExternalResources();
    logger.info("-- released external resources");
    logger.info("-- close success !");
    logger.info("----------------------------------------------------");
  }
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.