Top Description Fields Constructors Methods
io.netty.channel

public Class DefaultChannelProgressivePromise

extends DefaultProgressivePromise<Void>
implements ChannelProgressivePromise, FlushCheckpoint
Class Inheritance
All Implemented Interfaces
io.netty.channel.ChannelFlushPromiseNotifier.FlushCheckpoint, io.netty.channel.ChannelProgressivePromise, io.netty.channel.ChannelPromise, io.netty.util.concurrent.Promise, io.netty.util.concurrent.Future, java.util.concurrent.Future, io.netty.channel.ChannelFuture, io.netty.channel.ChannelProgressiveFuture, io.netty.util.concurrent.ProgressiveFuture, io.netty.util.concurrent.ProgressivePromise
Imports
io.netty.channel.ChannelFlushPromiseNotifier.FlushCheckpoint, io.netty.util.concurrent.DefaultProgressivePromise, .EventExecutor, .Future, .GenericFutureListener

The default ChannelProgressivePromise implementation. It is recommended to use Channel#newProgressivePromise() to create a new ChannelProgressivePromise rather than calling the constructor explicitly.

Field Summary

Modifier and TypeField and Description
private final Channel
private long

Constructor Summary

AccessConstructor and Description
public
DefaultChannelProgressivePromise(Channel
the Channel associated with this future
channel
)

Creates a new instance.

public
DefaultChannelProgressivePromise(Channel
the Channel associated with this future
channel
,
EventExecutor executor)

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public ChannelProgressivePromise
public ChannelProgressivePromise
public ChannelProgressivePromise
public ChannelProgressivePromise
public Channel
channel()

Implements io.netty.channel.ChannelFuture.channel, io.netty.channel.ChannelPromise.channel.

Returns a channel where the I/O operation associated with this future takes place.
protected void
protected EventExecutor
executor()

Overrides io.netty.util.concurrent.DefaultPromise.executor.

Get the executor used to notify listeners when this promise is complete.
public long
public void
public boolean
public ChannelProgressivePromise
public ChannelProgressivePromise
public ChannelProgressivePromise
public ChannelProgressivePromise
public ChannelProgressivePromise
public ChannelProgressivePromise
public ChannelProgressivePromise
public ChannelProgressivePromise
public ChannelProgressivePromise
public boolean
public ChannelProgressivePromise
unvoid()

Implements io.netty.channel.ChannelProgressivePromise.unvoid.

Returns a new ChannelPromise if isVoid() returns true otherwise itself.
Inherited from io.netty.util.concurrent.DefaultProgressivePromise:
tryProgress

Field Detail

channelback to summary
private final Channel channel
checkpointback to summary
private long checkpoint

Constructor Detail

DefaultChannelProgressivePromiseback to summary
public DefaultChannelProgressivePromise(Channel channel)

Creates a new instance.

Parameters
channel:Channel

the Channel associated with this future

DefaultChannelProgressivePromiseback to summary
public DefaultChannelProgressivePromise(Channel channel, EventExecutor executor)

Creates a new instance.

Parameters
channel:Channel

the Channel associated with this future

Method Detail

addListenerback to summary
public ChannelProgressivePromise addListener(GenericFutureListener<? extends Future<? super Void>> listener)

Overrides io.netty.util.concurrent.DefaultProgressivePromise.addListener.

Implements io.netty.channel.ChannelProgressivePromise.addListener, io.netty.util.concurrent.ProgressivePromise.addListener, io.netty.util.concurrent.Promise.addListener, io.netty.util.concurrent.Future.addListener.

Doc from io.netty.util.concurrent.Future.addListener.

Adds the specified listener to this future. The specified listener is notified when this future is done. If this future is already completed, the specified listener is notified immediately.

Annotations
@Override
addListenersback to summary
public ChannelProgressivePromise addListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)

Overrides io.netty.util.concurrent.DefaultProgressivePromise.addListeners.

Implements io.netty.channel.ChannelProgressivePromise.addListeners, io.netty.util.concurrent.ProgressivePromise.addListeners, io.netty.util.concurrent.Promise.addListeners, io.netty.util.concurrent.Future.addListeners.

Doc from io.netty.util.concurrent.Future.addListeners.

Adds the specified listeners to this future. The specified listeners are notified when this future is done. If this future is already completed, the specified listeners are notified immediately.

Annotations
@Override
awaitback to summary
public ChannelProgressivePromise await() throws InterruptedException

Overrides io.netty.util.concurrent.DefaultProgressivePromise.await.

Implements io.netty.channel.ChannelProgressivePromise.await, io.netty.util.concurrent.ProgressivePromise.await, io.netty.util.concurrent.Promise.await, io.netty.util.concurrent.Future.await.

Doc from io.netty.util.concurrent.Future.await.

Waits for this future to be completed.

Annotations
@Override
Exceptions
InterruptedException:
if the current thread was interrupted
awaitUninterruptiblyback to summary
public ChannelProgressivePromise awaitUninterruptibly()

Overrides io.netty.util.concurrent.DefaultProgressivePromise.awaitUninterruptibly.

Implements io.netty.channel.ChannelProgressivePromise.awaitUninterruptibly, io.netty.util.concurrent.ProgressivePromise.awaitUninterruptibly, io.netty.util.concurrent.Promise.awaitUninterruptibly, io.netty.util.concurrent.Future.awaitUninterruptibly.

Doc from io.netty.util.concurrent.Future.awaitUninterruptibly.

Waits for this future to be completed without interruption. This method catches an InterruptedException and discards it silently.

Annotations
@Override
channelback to summary
public Channel channel()

Implements io.netty.channel.ChannelFuture.channel, io.netty.channel.ChannelPromise.channel.

Doc from io.netty.channel.ChannelFuture.channel.

Returns a channel where the I/O operation associated with this future takes place.

Annotations
@Override
checkDeadLockback to summary
protected void checkDeadLock()

Overrides io.netty.util.concurrent.DefaultPromise.checkDeadLock.

Annotations
@Override
executorback to summary
protected EventExecutor executor()

Overrides io.netty.util.concurrent.DefaultPromise.executor.

Doc from io.netty.util.concurrent.DefaultPromise.executor.

Get the executor used to notify listeners when this promise is complete.

It is assumed this executor will protect against StackOverflowError exceptions. The executor may be used to avoid StackOverflowError by executing a Runnable if the stack depth exceeds a threshold.

Returns:EventExecutor

The executor used to notify listeners when this promise is complete.

Annotations
@Override
flushCheckpointback to summary
public long flushCheckpoint()

Implements io.netty.channel.ChannelFlushPromiseNotifier.FlushCheckpoint.flushCheckpoint.

Annotations
@Override
flushCheckpointback to summary
public void flushCheckpoint(long checkpoint)

Implements io.netty.channel.ChannelFlushPromiseNotifier.FlushCheckpoint.flushCheckpoint.

Annotations
@Override
isVoidback to summary
public boolean isVoid()

Implements io.netty.channel.ChannelFuture.isVoid.

Doc from io.netty.channel.ChannelFuture.isVoid.

Returns true if this ChannelFuture is a void future and so not allow to call any of the following methods:

Annotations
@Override
promiseback to summary
public ChannelProgressivePromise promise()

Implements io.netty.channel.ChannelFlushPromiseNotifier.FlushCheckpoint.promise.

Annotations
@Override
removeListenerback to summary
public ChannelProgressivePromise removeListener(GenericFutureListener<? extends Future<? super Void>> listener)

Overrides io.netty.util.concurrent.DefaultProgressivePromise.removeListener.

Implements io.netty.channel.ChannelProgressivePromise.removeListener, io.netty.util.concurrent.ProgressivePromise.removeListener, io.netty.util.concurrent.Promise.removeListener, io.netty.util.concurrent.Future.removeListener.

Doc from io.netty.util.concurrent.Future.removeListener.

Removes the first occurrence of the specified listener from this future. The specified listener is no longer notified when this future is done. If the specified listener is not associated with this future, this method does nothing and returns silently.

Annotations
@Override
removeListenersback to summary
public ChannelProgressivePromise removeListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)

Overrides io.netty.util.concurrent.DefaultProgressivePromise.removeListeners.

Implements io.netty.channel.ChannelProgressivePromise.removeListeners, io.netty.util.concurrent.ProgressivePromise.removeListeners, io.netty.util.concurrent.Promise.removeListeners, io.netty.util.concurrent.Future.removeListeners.

Doc from io.netty.util.concurrent.Future.removeListeners.

Removes the first occurrence for each of the listeners from this future. The specified listeners are no longer notified when this future is done. If the specified listeners are not associated with this future, this method does nothing and returns silently.

Annotations
@Override
setFailureback to summary
public ChannelProgressivePromise setFailure(Throwable cause)

Overrides io.netty.util.concurrent.DefaultProgressivePromise.setFailure.

Implements io.netty.channel.ChannelProgressivePromise.setFailure, io.netty.util.concurrent.ProgressivePromise.setFailure, io.netty.util.concurrent.Promise.setFailure.

Doc from io.netty.util.concurrent.Promise.setFailure.

Marks this future as a failure and notifies all listeners. If it is success or failed already it will throw an IllegalStateException.

Annotations
@Override
setProgressback to summary
public ChannelProgressivePromise setProgress(long progress, long total)

Overrides io.netty.util.concurrent.DefaultProgressivePromise.setProgress.

Implements io.netty.channel.ChannelProgressivePromise.setProgress, io.netty.util.concurrent.ProgressivePromise.setProgress.

Doc from io.netty.util.concurrent.ProgressivePromise.setProgress.

Sets the current progress of the operation and notifies the listeners that implement GenericProgressiveFutureListener.

Annotations
@Override
setSuccessback to summary
public ChannelProgressivePromise setSuccess()

Implements io.netty.channel.ChannelProgressivePromise.setSuccess.

Annotations
@Override
setSuccessback to summary
public ChannelProgressivePromise setSuccess(Void result)

Overrides io.netty.util.concurrent.DefaultProgressivePromise.setSuccess.

Implements io.netty.channel.ChannelProgressivePromise.setSuccess, io.netty.util.concurrent.ProgressivePromise.setSuccess, io.netty.util.concurrent.Promise.setSuccess.

Doc from io.netty.util.concurrent.Promise.setSuccess.

Marks this future as a success and notifies all listeners. If it is success or failed already it will throw an IllegalStateException.

Annotations
@Override
syncback to summary
public ChannelProgressivePromise sync() throws InterruptedException

Overrides io.netty.util.concurrent.DefaultProgressivePromise.sync.

Implements io.netty.channel.ChannelProgressivePromise.sync, io.netty.util.concurrent.ProgressivePromise.sync, io.netty.util.concurrent.Promise.sync, io.netty.util.concurrent.Future.sync.

Doc from io.netty.util.concurrent.Future.sync.

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.

Annotations
@Override
syncUninterruptiblyback to summary
public ChannelProgressivePromise syncUninterruptibly()

Overrides io.netty.util.concurrent.DefaultProgressivePromise.syncUninterruptibly.

Implements io.netty.channel.ChannelProgressivePromise.syncUninterruptibly, io.netty.util.concurrent.ProgressivePromise.syncUninterruptibly, io.netty.util.concurrent.Promise.syncUninterruptibly, io.netty.util.concurrent.Future.syncUninterruptibly.

Doc from io.netty.util.concurrent.Future.syncUninterruptibly.

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.

Annotations
@Override
trySuccessback to summary
public boolean trySuccess()

Implements io.netty.channel.ChannelPromise.trySuccess.

Annotations
@Override
unvoidback to summary
public ChannelProgressivePromise unvoid()

Implements io.netty.channel.ChannelProgressivePromise.unvoid.

Doc from io.netty.channel.ChannelPromise.unvoid.

Returns a new ChannelPromise if isVoid() returns true otherwise itself.

Annotations
@Override