Package org.jboss.netty.channel

Examples of org.jboss.netty.channel.ChannelFuture.removeListener()


    final ChannelFuture connectFuture = bootstrap
        .connect(new InetSocketAddress(host, port));

    connectFuture.addListener(listener);
    if (!latch.await(2, TimeUnit.SECONDS)) {
      connectFuture.removeListener(listener);
      connectFuture.cancel();
      throw new ExecutionException(new TimeoutException("创建链接2秒超时"));
    }
    if (!connectFuture.isSuccess()) {
      throw new RuntimeException("connect server fail " + host,
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.