Package io.netty.util.concurrent
Class PromiseNotifier<V,F extends Future<V>>
- java.lang.Object
-
- io.netty.util.concurrent.PromiseNotifier<V,F>
-
- Type Parameters:
V
- the type of value returned by the futureF
- the type of future
- All Implemented Interfaces:
GenericFutureListener<F>
,EventListener
- Direct Known Subclasses:
ChannelPromiseNotifier
public class PromiseNotifier<V,F extends Future<V>> extends Object implements GenericFutureListener<F>
GenericFutureListener
implementation which takes otherPromise
s and notifies them on completion.
-
-
Constructor Summary
Constructors Constructor Description PromiseNotifier(boolean logNotifyFailure, Promise<? super V>... promises)
Create a new instance.PromiseNotifier(Promise<? super V>... promises)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
operationComplete(F future)
Invoked when the operation associated with theFuture
has been completed.
-
-
-
Constructor Detail
-
PromiseNotifier
@SafeVarargs public PromiseNotifier(Promise<? super V>... promises)
Create a new instance.- Parameters:
promises
- thePromise
s to notify once thisGenericFutureListener
is notified.
-
PromiseNotifier
@SafeVarargs public PromiseNotifier(boolean logNotifyFailure, Promise<? super V>... promises)
Create a new instance.- Parameters:
logNotifyFailure
-true
if logging should be done in case notification fails.promises
- thePromise
s to notify once thisGenericFutureListener
is notified.
-
-
Method Detail
-
operationComplete
public void operationComplete(F future) throws Exception
Description copied from interface:GenericFutureListener
Invoked when the operation associated with theFuture
has been completed.- Specified by:
operationComplete
in interfaceGenericFutureListener<V>
- Parameters:
future
- the sourceFuture
which called this callback- Throws:
Exception
-
-