Examples of ChannelGroupFuture


Examples of io.netty.channel.group.ChannelGroupFuture

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

        // and then shutdown the thread pools
        if (workerGroup != null) {
            workerGroup.shutdownGracefully();
            workerGroup = null;
View Full Code Here

Examples of io.netty.channel.group.ChannelGroupFuture

      }


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

      if (!future.isSuccess())
      {
         HornetQServerLogger.LOGGER.nettyChannelGroupError();
         Iterator<Channel> iterator = future.group().iterator();
         while (iterator.hasNext())
         {
            Channel channel = iterator.next();
            if (channel.isActive())
            {
View Full Code Here

Examples of io.netty.channel.group.ChannelGroupFuture

      {
         return;
      }

      // We *pause* the acceptor so no new connections are made
      ChannelGroupFuture future = serverChannelGroup.close().awaitUninterruptibly();
      if (!future.isSuccess())
      {
         HornetQServerLogger.LOGGER.nettyChannelGroupBindError();
         Iterator<Channel> iterator = future.group().iterator();
         while (iterator.hasNext())
         {
            Channel channel = iterator.next();
            if (channel.isActive())
            {
View Full Code Here

Examples of io.netty.channel.group.ChannelGroupFuture

      }


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

      if (!future.isSuccess())
      {
         HornetQServerLogger.LOGGER.nettyChannelGroupError();
         Iterator<Channel> iterator = future.group().iterator();
         while (iterator.hasNext())
         {
            Channel channel = iterator.next();
            if (channel.isActive())
            {
View Full Code Here

Examples of io.netty.channel.group.ChannelGroupFuture

      {
         return;
      }

      // We *pause* the acceptor so no new connections are made
      ChannelGroupFuture future = serverChannelGroup.close().awaitUninterruptibly();
      if (!future.isSuccess())
      {
         HornetQServerLogger.LOGGER.nettyChannelGroupBindError();
         Iterator<Channel> iterator = future.group().iterator();
         while (iterator.hasNext())
         {
            Channel channel = iterator.next();
            if (channel.isActive())
            {
View Full Code Here

Examples of io.netty.channel.group.ChannelGroupFuture

        return channel;
    }

    @Override
    public void releaseExternalResources() {
        ChannelGroupFuture close = channels.close();
        close.awaitUninterruptibly();
        ExecutorUtil.terminate(executor);
    }
View Full Code Here

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

     * Stop the Server
     */
    public void stop() {
        if (started.getAndSet(false)) {
            runtime.destroy();
            final ChannelGroupFuture future = ALL_CHANNELS.close();
            future.awaitUninterruptibly();
            bootstrap.getFactory().releaseExternalResources();
            ALL_CHANNELS.clear();
        }
    }
View Full Code Here

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

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

        // release the external resource here and we keep the timer open
        // and then shutdown the thread pools
        if (bossPool != null) {
            bossPool.shutdown();
View Full Code Here

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

  public void stopServer() throws Exception
  {
    LOG.debug("In stopServer method of class: {}",
        this.getClass().getName());
    ChannelGroupFuture future = ALL_CHANNELS.close();
    try {
      future.await();
    } catch (InterruptedException e) {
      LOG.error("Execption occurred while waiting for channels to close: {}",e);
    }
    super.stopServer();
  }
View Full Code Here

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

  @Override
  public void stopServer() throws Exception
  {
    LOG.debug("In stopServer method of class: {}",
        this.getClass().getName());
    ChannelGroupFuture future = ALL_CHANNELS.close();
    try {
      future.await();
    } catch (InterruptedException e) {
      LOG.error("Execption occurred while waiting for channels to close: {}",e);
    }
    serverBootstrap.releaseExternalResources();
    gameAdminService.shutdown();
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.