Examples of awaitUninterruptibly()


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

     */
    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.awaitUninterruptibly()

    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.serviceconnector.net.req.netty.NettyOperationListener.awaitUninterruptibly()

      if (this.channel != null) {
        ChannelFuture future = this.channel.close();
        NettyOperationListener operationListener = new NettyOperationListener();
        future.addListener(operationListener);
        try {
          operationListener.awaitUninterruptibly(Constants.TECH_LEVEL_OPERATION_TIMEOUT_MILLIS);
        } catch (CommunicationException ex) {
          LOGGER.error("disconnect", ex); // stopListening must continue
        }
      }
      if (this.serverThread != null) {
View Full Code Here

Examples of programming5.net.ReceiveRequest.awaitUninterruptibly()

        byte[] ret = null;
        ReceiveRequest myRequest = new ReceiveRequest();
        synchronized (receiveRequests) {
            receiveRequests.add(myRequest);
        }
        myRequest.awaitUninterruptibly();
        if (myRequest.isDone()) {
            ret = myRequest.getMessage();
        }
        return ret;
    }
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.