public class DefaultChannelProgressivePromise extends io.netty.util.concurrent.DefaultProgressivePromise<Void> implements ChannelProgressivePromise
ChannelProgressivePromise
implementation. It is recommended to use
ChannelOutboundInvoker.newProgressivePromise()
to create a new ChannelProgressivePromise
rather than calling the
constructor explicitly.Constructor and Description |
---|
DefaultChannelProgressivePromise(Channel channel)
Creates a new instance.
|
DefaultChannelProgressivePromise(Channel channel,
io.netty.util.concurrent.EventExecutor executor)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
ChannelProgressivePromise |
addListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener) |
ChannelProgressivePromise |
addListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>>... listeners) |
ChannelProgressivePromise |
await() |
ChannelProgressivePromise |
awaitUninterruptibly() |
Channel |
channel()
Returns a channel where the I/O operation associated with this
future takes place.
|
protected void |
checkDeadLock() |
protected io.netty.util.concurrent.EventExecutor |
executor() |
long |
flushCheckpoint() |
void |
flushCheckpoint(long checkpoint) |
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()
|
ChannelProgressivePromise |
promise() |
ChannelProgressivePromise |
removeListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener) |
ChannelProgressivePromise |
removeListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>>... listeners) |
ChannelProgressivePromise |
setFailure(Throwable cause) |
ChannelProgressivePromise |
setProgress(long progress,
long total) |
ChannelProgressivePromise |
setSuccess() |
ChannelProgressivePromise |
setSuccess(Void result) |
ChannelProgressivePromise |
sync() |
ChannelProgressivePromise |
syncUninterruptibly() |
boolean |
trySuccess() |
ChannelProgressivePromise |
unvoid()
|
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isCancelled, isDone, isSuccess, notifyListener, setUncancellable, toString, toStringBuilder, tryFailure, trySuccess
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setUncancellable, tryFailure, trySuccess
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccess
get, get, isCancelled, isDone
public DefaultChannelProgressivePromise(Channel channel)
channel
- the Channel
associated with this futureprotected io.netty.util.concurrent.EventExecutor executor()
executor
in class io.netty.util.concurrent.DefaultPromise<Void>
public Channel channel()
ChannelFuture
channel
in interface ChannelFuture
channel
in interface ChannelPromise
public ChannelProgressivePromise setSuccess()
setSuccess
in interface ChannelProgressivePromise
setSuccess
in interface ChannelPromise
public ChannelProgressivePromise setSuccess(Void result)
setSuccess
in interface ChannelProgressivePromise
setSuccess
in interface ChannelPromise
setSuccess
in interface io.netty.util.concurrent.ProgressivePromise<Void>
setSuccess
in interface io.netty.util.concurrent.Promise<Void>
setSuccess
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
public boolean trySuccess()
trySuccess
in interface ChannelPromise
public ChannelProgressivePromise setFailure(Throwable cause)
setFailure
in interface ChannelProgressivePromise
setFailure
in interface ChannelPromise
setFailure
in interface io.netty.util.concurrent.ProgressivePromise<Void>
setFailure
in interface io.netty.util.concurrent.Promise<Void>
setFailure
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
public ChannelProgressivePromise setProgress(long progress, long total)
setProgress
in interface ChannelProgressivePromise
setProgress
in interface io.netty.util.concurrent.ProgressivePromise<Void>
setProgress
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
public ChannelProgressivePromise addListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener)
addListener
in interface ChannelFuture
addListener
in interface ChannelProgressiveFuture
addListener
in interface ChannelProgressivePromise
addListener
in interface ChannelPromise
addListener
in interface io.netty.util.concurrent.ProgressiveFuture<Void>
addListener
in interface io.netty.util.concurrent.ProgressivePromise<Void>
addListener
in interface io.netty.util.concurrent.Promise<Void>
addListener
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
public ChannelProgressivePromise addListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>>... listeners)
addListeners
in interface ChannelFuture
addListeners
in interface ChannelProgressiveFuture
addListeners
in interface ChannelProgressivePromise
addListeners
in interface ChannelPromise
addListeners
in interface io.netty.util.concurrent.ProgressiveFuture<Void>
addListeners
in interface io.netty.util.concurrent.ProgressivePromise<Void>
addListeners
in interface io.netty.util.concurrent.Promise<Void>
addListeners
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
public ChannelProgressivePromise removeListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener)
removeListener
in interface ChannelFuture
removeListener
in interface ChannelProgressiveFuture
removeListener
in interface ChannelProgressivePromise
removeListener
in interface ChannelPromise
removeListener
in interface io.netty.util.concurrent.ProgressiveFuture<Void>
removeListener
in interface io.netty.util.concurrent.ProgressivePromise<Void>
removeListener
in interface io.netty.util.concurrent.Promise<Void>
removeListener
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
public ChannelProgressivePromise removeListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>>... listeners)
removeListeners
in interface ChannelFuture
removeListeners
in interface ChannelProgressiveFuture
removeListeners
in interface ChannelProgressivePromise
removeListeners
in interface ChannelPromise
removeListeners
in interface io.netty.util.concurrent.ProgressiveFuture<Void>
removeListeners
in interface io.netty.util.concurrent.ProgressivePromise<Void>
removeListeners
in interface io.netty.util.concurrent.Promise<Void>
removeListeners
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
public ChannelProgressivePromise sync() throws InterruptedException
sync
in interface ChannelFuture
sync
in interface ChannelProgressiveFuture
sync
in interface ChannelProgressivePromise
sync
in interface ChannelPromise
sync
in interface io.netty.util.concurrent.ProgressiveFuture<Void>
sync
in interface io.netty.util.concurrent.ProgressivePromise<Void>
sync
in interface io.netty.util.concurrent.Promise<Void>
sync
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
InterruptedException
public ChannelProgressivePromise syncUninterruptibly()
syncUninterruptibly
in interface ChannelFuture
syncUninterruptibly
in interface ChannelProgressiveFuture
syncUninterruptibly
in interface ChannelProgressivePromise
syncUninterruptibly
in interface ChannelPromise
syncUninterruptibly
in interface io.netty.util.concurrent.ProgressiveFuture<Void>
syncUninterruptibly
in interface io.netty.util.concurrent.ProgressivePromise<Void>
syncUninterruptibly
in interface io.netty.util.concurrent.Promise<Void>
syncUninterruptibly
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
public ChannelProgressivePromise await() throws InterruptedException
await
in interface ChannelFuture
await
in interface ChannelProgressiveFuture
await
in interface ChannelProgressivePromise
await
in interface ChannelPromise
await
in interface io.netty.util.concurrent.ProgressiveFuture<Void>
await
in interface io.netty.util.concurrent.ProgressivePromise<Void>
await
in interface io.netty.util.concurrent.Promise<Void>
await
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
InterruptedException
public ChannelProgressivePromise awaitUninterruptibly()
awaitUninterruptibly
in interface ChannelFuture
awaitUninterruptibly
in interface ChannelProgressiveFuture
awaitUninterruptibly
in interface ChannelProgressivePromise
awaitUninterruptibly
in interface ChannelPromise
awaitUninterruptibly
in interface io.netty.util.concurrent.ProgressiveFuture<Void>
awaitUninterruptibly
in interface io.netty.util.concurrent.ProgressivePromise<Void>
awaitUninterruptibly
in interface io.netty.util.concurrent.Promise<Void>
awaitUninterruptibly
in class io.netty.util.concurrent.DefaultProgressivePromise<Void>
public long flushCheckpoint()
public void flushCheckpoint(long checkpoint)
public ChannelProgressivePromise promise()
protected void checkDeadLock()
checkDeadLock
in class io.netty.util.concurrent.DefaultPromise<Void>
public ChannelProgressivePromise unvoid()
ChannelPromise
unvoid
in interface ChannelProgressivePromise
unvoid
in interface ChannelPromise
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
Copyright © 2008–2019 The Netty Project. All rights reserved.