@UnstableApi public final class DelegatingChannelPromiseNotifier extends Object implements ChannelPromise, ChannelFutureListener
CLOSE, CLOSE_ON_FAILURE, FIRE_EXCEPTION_ON_FAILURE
Constructor and Description |
---|
DelegatingChannelPromiseNotifier(ChannelPromise delegate) |
DelegatingChannelPromiseNotifier(ChannelPromise delegate,
boolean logNotifyFailure) |
Modifier and Type | Method and Description |
---|---|
ChannelPromise |
addListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener) |
ChannelPromise |
addListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>>... listeners) |
ChannelPromise |
await() |
boolean |
await(long timeoutMillis) |
boolean |
await(long timeout,
TimeUnit unit) |
ChannelPromise |
awaitUninterruptibly() |
boolean |
awaitUninterruptibly(long timeoutMillis) |
boolean |
awaitUninterruptibly(long timeout,
TimeUnit unit) |
boolean |
cancel(boolean mayInterruptIfRunning) |
Throwable |
cause() |
Channel |
channel()
Returns a channel where the I/O operation associated with this
future takes place.
|
Void |
get() |
Void |
get(long timeout,
TimeUnit unit) |
Void |
getNow() |
boolean |
isCancellable() |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isSuccess() |
boolean |
isVoid()
Returns
true if this ChannelFuture is a void future and so not allow to call any of the
following methods:
ChannelFuture.addListener(GenericFutureListener)
ChannelFuture.addListeners(GenericFutureListener[])
ChannelFuture.await()
Future.await(long, TimeUnit) ()}
Future.await(long) ()}
ChannelFuture.awaitUninterruptibly()
ChannelFuture.sync()
ChannelFuture.syncUninterruptibly()
|
void |
operationComplete(ChannelFuture future) |
ChannelPromise |
removeListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener) |
ChannelPromise |
removeListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>>... listeners) |
ChannelPromise |
setFailure(Throwable cause) |
ChannelPromise |
setSuccess() |
ChannelPromise |
setSuccess(Void result) |
boolean |
setUncancellable() |
ChannelPromise |
sync() |
ChannelPromise |
syncUninterruptibly() |
boolean |
tryFailure(Throwable cause) |
boolean |
trySuccess() |
boolean |
trySuccess(Void result) |
ChannelPromise |
unvoid()
|
public DelegatingChannelPromiseNotifier(ChannelPromise delegate)
public DelegatingChannelPromiseNotifier(ChannelPromise delegate, boolean logNotifyFailure)
public void operationComplete(ChannelFuture future) throws Exception
operationComplete
in interface io.netty.util.concurrent.GenericFutureListener<ChannelFuture>
Exception
public Channel channel()
ChannelFuture
channel
in interface ChannelFuture
channel
in interface ChannelPromise
public ChannelPromise setSuccess(Void result)
setSuccess
in interface ChannelPromise
setSuccess
in interface io.netty.util.concurrent.Promise<Void>
public ChannelPromise setSuccess()
setSuccess
in interface ChannelPromise
public boolean trySuccess()
trySuccess
in interface ChannelPromise
public boolean trySuccess(Void result)
trySuccess
in interface io.netty.util.concurrent.Promise<Void>
public ChannelPromise setFailure(Throwable cause)
setFailure
in interface ChannelPromise
setFailure
in interface io.netty.util.concurrent.Promise<Void>
public ChannelPromise addListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener)
addListener
in interface ChannelFuture
addListener
in interface ChannelPromise
addListener
in interface io.netty.util.concurrent.Promise<Void>
public ChannelPromise addListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>>... listeners)
addListeners
in interface ChannelFuture
addListeners
in interface ChannelPromise
addListeners
in interface io.netty.util.concurrent.Promise<Void>
public ChannelPromise removeListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener)
removeListener
in interface ChannelFuture
removeListener
in interface ChannelPromise
removeListener
in interface io.netty.util.concurrent.Promise<Void>
public ChannelPromise removeListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>>... listeners)
removeListeners
in interface ChannelFuture
removeListeners
in interface ChannelPromise
removeListeners
in interface io.netty.util.concurrent.Promise<Void>
public boolean tryFailure(Throwable cause)
tryFailure
in interface io.netty.util.concurrent.Promise<Void>
public boolean setUncancellable()
setUncancellable
in interface io.netty.util.concurrent.Promise<Void>
public ChannelPromise await() throws InterruptedException
await
in interface ChannelFuture
await
in interface ChannelPromise
await
in interface io.netty.util.concurrent.Promise<Void>
InterruptedException
public ChannelPromise awaitUninterruptibly()
awaitUninterruptibly
in interface ChannelFuture
awaitUninterruptibly
in interface ChannelPromise
awaitUninterruptibly
in interface io.netty.util.concurrent.Promise<Void>
public boolean isVoid()
ChannelFuture
true
if this ChannelFuture
is a void future and so not allow to call any of the
following methods:
ChannelFuture.addListener(GenericFutureListener)
ChannelFuture.addListeners(GenericFutureListener[])
ChannelFuture.await()
Future.await(long, TimeUnit)
()}Future.await(long)
()}ChannelFuture.awaitUninterruptibly()
ChannelFuture.sync()
ChannelFuture.syncUninterruptibly()
isVoid
in interface ChannelFuture
public ChannelPromise unvoid()
ChannelPromise
unvoid
in interface ChannelPromise
public boolean await(long timeout, TimeUnit unit) throws InterruptedException
InterruptedException
public boolean await(long timeoutMillis) throws InterruptedException
InterruptedException
public boolean awaitUninterruptibly(long timeout, TimeUnit unit)
public boolean awaitUninterruptibly(long timeoutMillis)
public Void getNow()
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<Void>
public Void get() throws InterruptedException, ExecutionException
get
in interface Future<Void>
InterruptedException
ExecutionException
public Void get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<Void>
InterruptedException
ExecutionException
TimeoutException
public ChannelPromise sync() throws InterruptedException
sync
in interface ChannelFuture
sync
in interface ChannelPromise
sync
in interface io.netty.util.concurrent.Promise<Void>
InterruptedException
public ChannelPromise syncUninterruptibly()
syncUninterruptibly
in interface ChannelFuture
syncUninterruptibly
in interface ChannelPromise
syncUninterruptibly
in interface io.netty.util.concurrent.Promise<Void>
public boolean isSuccess()
public boolean isCancellable()
public Throwable cause()
Copyright © 2008–2019 The Netty Project. All rights reserved.