Package org.jboss.netty.channel.group

Examples of org.jboss.netty.channel.group.ChannelGroupFuture


    this.maxShutdownWaitTime = maxShutdownWaitTime;
    Runtime.getRuntime().addShutdownHook(new Thread()
    {
      public void run()
      {
        ChannelGroupFuture future = ALL_CHANNELS.close();
        try
        {
          future.await(NettyTCPClient.this.maxShutdownWaitTime);
        }
        catch (InterruptedException e)
        {
          e.printStackTrace();
        }
View Full Code Here


    protected void doStop() throws Exception {
        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

        if (LOG.isDebugEnabled()) {
            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

  }

  public void stop() {
    log.info("terminating daemon; closing all channels");

    ChannelGroupFuture future = allChannels.close();
    future.awaitUninterruptibly();
    if (!future.isCompleteSuccess()) {
      throw new RuntimeException("failure to complete closing all network channels");
    }
    log.info("channels closed, freeing cache storage");
    try {
      cache.close();
View Full Code Here

    // No-op.
  }
 
  @Override
  public void close() {
    ChannelGroupFuture future = allChannels.close();
    future.awaitUninterruptibly();
    channelFactory.releaseExternalResources();
    closed.countDown();
  }
View Full Code Here

    @Override
    protected void doStop() throws Exception {
        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

    @Override
    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.isInfoEnabled()) {
            LOG.info("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 closeConnection() throws Exception {
        // close all channels
        ChannelGroupFuture future = allChannels.close();
        future.awaitUninterruptibly();

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

    @Override
    protected void doStop() throws Exception {
        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

TOP

Related Classes of org.jboss.netty.channel.group.ChannelGroupFuture

Copyright © 2018 www.massapicom. 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.