Top Description Methods
io.netty.util.concurrent

public Interface ProgressivePromise<V>

extends Promise<V>, ProgressiveFuture<V>
Known Direct Implementers
io.netty.util.concurrent.DefaultProgressivePromise

Special ProgressiveFuture which is writable.

Method Summary

Modifier and TypeMethod and Description
public ProgressivePromise<V>
addListener(GenericFutureListener<? extends Future<? super V>> listener)

Redeclares io.netty.util.concurrent.Promise.addListener, io.netty.util.concurrent.ProgressiveFuture.addListener.

Adds the specified listener to this future.
public ProgressivePromise<V>
addListeners(GenericFutureListener<? extends Future<? super V>>... listeners)

Redeclares io.netty.util.concurrent.Promise.addListeners, io.netty.util.concurrent.ProgressiveFuture.addListeners.

Adds the specified listeners to this future.
public ProgressivePromise<V>
public ProgressivePromise<V>
public ProgressivePromise<V>
removeListener(GenericFutureListener<? extends Future<? super V>> listener)

Redeclares io.netty.util.concurrent.Promise.removeListener, io.netty.util.concurrent.ProgressiveFuture.removeListener.

Removes the first occurrence of the specified listener from this future.
public ProgressivePromise<V>
removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners)

Redeclares io.netty.util.concurrent.Promise.removeListeners, io.netty.util.concurrent.ProgressiveFuture.removeListeners.

Removes the first occurrence for each of the listeners from this future.
public ProgressivePromise<V>
setFailure(Throwable cause)

Redeclares io.netty.util.concurrent.Promise.setFailure.

Marks this future as a failure and notifies all listeners.
public ProgressivePromise<V>
setProgress(long progress, long total)

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

public ProgressivePromise<V>
setSuccess(V result)

Redeclares io.netty.util.concurrent.Promise.setSuccess.

Marks this future as a success and notifies all listeners.
public ProgressivePromise<V>
sync()

Redeclares io.netty.util.concurrent.Promise.sync, io.netty.util.concurrent.ProgressiveFuture.sync.

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
public ProgressivePromise<V>
syncUninterruptibly()

Redeclares io.netty.util.concurrent.Promise.syncUninterruptibly, io.netty.util.concurrent.ProgressiveFuture.syncUninterruptibly.

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
public boolean
tryProgress(long progress, long total)

Tries to set the current progress of the operation and notifies the listeners that implement GenericProgressiveFutureListener.

Inherited from io.netty.util.concurrent.Promise:
setUncancellabletryFailuretrySuccess

Method Detail

addListenerback to summary
public ProgressivePromise<V> addListener(GenericFutureListener<? extends Future<? super V>> listener)

Redeclares io.netty.util.concurrent.Promise.addListener, io.netty.util.concurrent.ProgressiveFuture.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 ProgressivePromise<V> addListeners(GenericFutureListener<? extends Future<? super V>>... listeners)

Redeclares io.netty.util.concurrent.Promise.addListeners, io.netty.util.concurrent.ProgressiveFuture.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 ProgressivePromise<V> await() throws InterruptedException

Redeclares io.netty.util.concurrent.Promise.await, io.netty.util.concurrent.ProgressiveFuture.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 ProgressivePromise<V> awaitUninterruptibly()

Redeclares io.netty.util.concurrent.Promise.awaitUninterruptibly, io.netty.util.concurrent.ProgressiveFuture.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
removeListenerback to summary
public ProgressivePromise<V> removeListener(GenericFutureListener<? extends Future<? super V>> listener)

Redeclares io.netty.util.concurrent.Promise.removeListener, io.netty.util.concurrent.ProgressiveFuture.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 ProgressivePromise<V> removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners)

Redeclares io.netty.util.concurrent.Promise.removeListeners, io.netty.util.concurrent.ProgressiveFuture.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 ProgressivePromise<V> setFailure(Throwable cause)

Redeclares 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 ProgressivePromise<V> setProgress(long progress, long total)

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

setSuccessback to summary
public ProgressivePromise<V> setSuccess(V result)

Redeclares 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 ProgressivePromise<V> sync() throws InterruptedException

Redeclares io.netty.util.concurrent.Promise.sync, io.netty.util.concurrent.ProgressiveFuture.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 ProgressivePromise<V> syncUninterruptibly()

Redeclares io.netty.util.concurrent.Promise.syncUninterruptibly, io.netty.util.concurrent.ProgressiveFuture.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
tryProgressback to summary
public boolean tryProgress(long progress, long total)

Tries to set the current progress of the operation and notifies the listeners that implement GenericProgressiveFutureListener. If the operation is already complete or the progress is out of range, this method does nothing but returning false.