Examples of ChannelGroupFuture


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

    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

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

  public InetSocketAddress getBindAddress() {
    return this.bindAddr;
  }

  public void stop() {
    ChannelGroupFuture future = channelGroup.close();
    future.awaitUninterruptibly();
    factory.releaseExternalResources();

    LOG.info("HttpDataServer shutdown ("
        + this.bindAddr.getAddress().getHostAddress() + ":"
        + this.bindAddr.getPort() + ")");
View Full Code Here

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

         httpKeepAliveRunnable.close();
      }

      // serverChannelGroup has been unbound in pause()
      serverChannelGroup.close().awaitUninterruptibly();
      ChannelGroupFuture future = channelGroup.close().awaitUninterruptibly();

      if (!future.isCompleteSuccess())
      {
         NettyAcceptor.log.warn("channel group did not completely close");
         Iterator<Channel> iterator = future.getGroup().iterator();
         while (iterator.hasNext())
         {
            Channel channel = iterator.next();
            if (channel.isBound())
            {
View Full Code Here

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

      {
         return;
      }

      // We *pause* the acceptor so no new connections are made
      ChannelGroupFuture future = serverChannelGroup.unbind().awaitUninterruptibly();
      if (!future.isCompleteSuccess())
      {
         NettyAcceptor.log.warn("server channel group did not completely unbind");
         Iterator<Channel> iterator = future.getGroup().iterator();
         while (iterator.hasNext())
         {
            Channel channel = iterator.next();
            if (channel.isBound())
            {
View Full Code Here

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

  @Override
  public Object unLoadGame(Game game)
  {
    if(null != game){
      ChannelGroupFuture groupFuture = (ChannelGroupFuture)game.unload();
      return groupFuture;
    }
    return null;
  }
View Full Code Here

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

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

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

    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

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

        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

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

  }

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