List of usage examples for io.netty.util.concurrent PromiseNotifier PromiseNotifier
@SafeVarargs public PromiseNotifier(Promise<? super V>... promises)
From source file:com.turo.pushy.apns.ApnsChannelFactory.java
License:Open Source License
/** * Destroys a channel by closing it.//from w w w. j a va2 s. com * * @param channel the channel to destroy * @param promise the promise to notify when the channel has been destroyed * * @return a future that will be notified when the channel has been destroyed */ @Override public Future<Void> destroy(final Channel channel, final Promise<Void> promise) { channel.close().addListener(new PromiseNotifier<>(promise)); return promise; }