类io.netty.util.concurrent.SucceededFuture源码实例Demo

下面列出了怎么用io.netty.util.concurrent.SucceededFuture的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: wind-im   文件: NettyClient2.java
public void disconnect() {
	// logger.info("close tcp socket, Disconnecting.");
	synchronized (this.clientBoot) {
		this.channelPromise = null;
		final Future<Void> channelCloseFuture;
		if (this.channelPromise != null) {
			channelCloseFuture = this.channelPromise.channel().close();
		} else {
			channelCloseFuture = new SucceededFuture<Void>(GlobalEventExecutor.INSTANCE, null);
		}
		channelCloseFuture.addListener(new GenericFutureListener<Future<Void>>() {
			@Override
			public void operationComplete(final Future<Void> future) throws Exception {
				NettyClient2.this.clientBoot.config().group().shutdownGracefully();
			}
		});
	}
	// logger.info("close netty tcp socket connection");
}
 
源代码2 项目: wind-im   文件: PlatformSSLClient.java
public void disconnect() {
	// logger.info("close tcp socket, Disconnecting.");
	synchronized (this.clientBoot) {
		this.channelPromise = null;
		final Future<Void> channelCloseFuture;
		if (this.channelPromise != null) {
			channelCloseFuture = this.channelPromise.channel().close();
		} else {
			channelCloseFuture = new SucceededFuture<Void>(GlobalEventExecutor.INSTANCE, null);
		}
		channelCloseFuture.addListener(new GenericFutureListener<Future<Void>>() {
			@Override
			public void operationComplete(final Future<Void> future) throws Exception {
				PlatformSSLClient.this.clientBoot.config().group().shutdownGracefully();
			}
		});
	}
	// logger.info("close netty tcp socket connection");
}
 
源代码3 项目: openzaly   文件: NettyClient2.java
public void disconnect() {
	// logger.info("close tcp socket, Disconnecting.");
	synchronized (this.clientBoot) {
		this.channelPromise = null;
		final Future<Void> channelCloseFuture;
		if (this.channelPromise != null) {
			channelCloseFuture = this.channelPromise.channel().close();
		} else {
			channelCloseFuture = new SucceededFuture<Void>(GlobalEventExecutor.INSTANCE, null);
		}
		channelCloseFuture.addListener(new GenericFutureListener<Future<Void>>() {
			@Override
			public void operationComplete(final Future<Void> future) throws Exception {
				NettyClient2.this.clientBoot.config().group().shutdownGracefully();
			}
		});
	}
	// logger.info("close netty tcp socket connection");
}
 
源代码4 项目: openzaly   文件: PlatformSSLClient.java
public void disconnect() {
	// logger.info("close tcp socket, Disconnecting.");
	synchronized (this.clientBoot) {
		this.channelPromise = null;
		final Future<Void> channelCloseFuture;
		if (this.channelPromise != null) {
			channelCloseFuture = this.channelPromise.channel().close();
		} else {
			channelCloseFuture = new SucceededFuture<Void>(GlobalEventExecutor.INSTANCE, null);
		}
		channelCloseFuture.addListener(new GenericFutureListener<Future<Void>>() {
			@Override
			public void operationComplete(final Future<Void> future) throws Exception {
				PlatformSSLClient.this.clientBoot.config().group().shutdownGracefully();
			}
		});
	}
	// logger.info("close netty tcp socket connection");
}
 
源代码5 项目: openzaly   文件: NettyClient2.java
public void disconnect() {
	// logger.info("close tcp socket, Disconnecting.");
	synchronized (this.clientBoot) {
		this.channelPromise = null;
		final Future<Void> channelCloseFuture;
		if (this.channelPromise != null) {
			channelCloseFuture = this.channelPromise.channel().close();
		} else {
			channelCloseFuture = new SucceededFuture<Void>(GlobalEventExecutor.INSTANCE, null);
		}
		channelCloseFuture.addListener(new GenericFutureListener<Future<Void>>() {
			@Override
			public void operationComplete(final Future<Void> future) throws Exception {
				NettyClient2.this.clientBoot.config().group().shutdownGracefully();
			}
		});
	}
	// logger.info("close netty tcp socket connection");
}
 
源代码6 项目: openzaly   文件: PlatformSSLClient.java
public void disconnect() {
	// logger.info("close tcp socket, Disconnecting.");
	synchronized (this.clientBoot) {
		this.channelPromise = null;
		final Future<Void> channelCloseFuture;
		if (this.channelPromise != null) {
			channelCloseFuture = this.channelPromise.channel().close();
		} else {
			channelCloseFuture = new SucceededFuture<Void>(GlobalEventExecutor.INSTANCE, null);
		}
		channelCloseFuture.addListener(new GenericFutureListener<Future<Void>>() {
			@Override
			public void operationComplete(final Future<Void> future) throws Exception {
				PlatformSSLClient.this.clientBoot.config().group().shutdownGracefully();
			}
		});
	}
	// logger.info("close netty tcp socket connection");
}
 
源代码7 项目: aws-sdk-java-v2   文件: ReleaseOnceChannelPool.java
@Override
public Future<Void> release(Channel channel) {
    if (shouldRelease(channel)) {
        return delegate.release(channel);
    } else {
        return new SucceededFuture<>(channel.eventLoop(), null);
    }
}
 
 类所在包
 类方法
 同包方法