Package io.netty.channel
Interface ChannelProgressivePromise
-
- All Superinterfaces:
ChannelFuture,ChannelProgressiveFuture,ChannelPromise,Future<java.lang.Void>,java.util.concurrent.Future<java.lang.Void>,ProgressiveFuture<java.lang.Void>,ProgressivePromise<java.lang.Void>,Promise<java.lang.Void>
- All Known Implementing Classes:
DefaultChannelProgressivePromise
public interface ChannelProgressivePromise extends ProgressivePromise<java.lang.Void>, ChannelProgressiveFuture, ChannelPromise
SpecialChannelPromisewhich will be notified once the associated bytes is transferring.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChannelProgressivePromiseaddListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)Adds the specified listener to this future.ChannelProgressivePromiseaddListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)Adds the specified listeners to this future.ChannelProgressivePromiseawait()Waits for this future to be completed.ChannelProgressivePromiseawaitUninterruptibly()Waits for this future to be completed without interruption.ChannelProgressivePromiseremoveListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)Removes the first occurrence of the specified listener from this future.ChannelProgressivePromiseremoveListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)Removes the first occurrence for each of the listeners from this future.ChannelProgressivePromisesetFailure(java.lang.Throwable cause)Marks this future as a failure and notifies all listeners.ChannelProgressivePromisesetProgress(long progress, long total)Sets the current progress of the operation and notifies the listeners that implementGenericProgressiveFutureListener.ChannelProgressivePromisesetSuccess()ChannelProgressivePromisesetSuccess(java.lang.Void result)Marks this future as a success and notifies all listeners.ChannelProgressivePromisesync()Waits for this future until it is done, and rethrows the cause of the failure if this future failed.ChannelProgressivePromisesyncUninterruptibly()Waits for this future until it is done, and rethrows the cause of the failure if this future failed.ChannelProgressivePromiseunvoid()-
Methods inherited from interface io.netty.channel.ChannelFuture
isVoid
-
Methods inherited from interface io.netty.channel.ChannelPromise
channel, trySuccess
-
Methods inherited from interface io.netty.util.concurrent.Future
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccess
-
Methods inherited from interface io.netty.util.concurrent.ProgressivePromise
tryProgress
-
Methods inherited from interface io.netty.util.concurrent.Promise
setUncancellable, tryFailure, trySuccess
-
-
-
-
Method Detail
-
addListener
ChannelProgressivePromise addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Description copied from interface:FutureAdds 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.- Specified by:
addListenerin interfaceChannelFuture- Specified by:
addListenerin interfaceChannelProgressiveFuture- Specified by:
addListenerin interfaceChannelPromise- Specified by:
addListenerin interfaceFuture<java.lang.Void>- Specified by:
addListenerin interfaceProgressiveFuture<java.lang.Void>- Specified by:
addListenerin interfaceProgressivePromise<java.lang.Void>- Specified by:
addListenerin interfacePromise<java.lang.Void>
-
addListeners
ChannelProgressivePromise addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Description copied from interface:FutureAdds 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.- Specified by:
addListenersin interfaceChannelFuture- Specified by:
addListenersin interfaceChannelProgressiveFuture- Specified by:
addListenersin interfaceChannelPromise- Specified by:
addListenersin interfaceFuture<java.lang.Void>- Specified by:
addListenersin interfaceProgressiveFuture<java.lang.Void>- Specified by:
addListenersin interfaceProgressivePromise<java.lang.Void>- Specified by:
addListenersin interfacePromise<java.lang.Void>
-
removeListener
ChannelProgressivePromise removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Description copied from interface:FutureRemoves 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.- Specified by:
removeListenerin interfaceChannelFuture- Specified by:
removeListenerin interfaceChannelProgressiveFuture- Specified by:
removeListenerin interfaceChannelPromise- Specified by:
removeListenerin interfaceFuture<java.lang.Void>- Specified by:
removeListenerin interfaceProgressiveFuture<java.lang.Void>- Specified by:
removeListenerin interfaceProgressivePromise<java.lang.Void>- Specified by:
removeListenerin interfacePromise<java.lang.Void>
-
removeListeners
ChannelProgressivePromise removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Description copied from interface:FutureRemoves 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.- Specified by:
removeListenersin interfaceChannelFuture- Specified by:
removeListenersin interfaceChannelProgressiveFuture- Specified by:
removeListenersin interfaceChannelPromise- Specified by:
removeListenersin interfaceFuture<java.lang.Void>- Specified by:
removeListenersin interfaceProgressiveFuture<java.lang.Void>- Specified by:
removeListenersin interfaceProgressivePromise<java.lang.Void>- Specified by:
removeListenersin interfacePromise<java.lang.Void>
-
sync
ChannelProgressivePromise sync() throws java.lang.InterruptedException
Description copied from interface:FutureWaits for this future until it is done, and rethrows the cause of the failure if this future failed.- Specified by:
syncin interfaceChannelFuture- Specified by:
syncin interfaceChannelProgressiveFuture- Specified by:
syncin interfaceChannelPromise- Specified by:
syncin interfaceFuture<java.lang.Void>- Specified by:
syncin interfaceProgressiveFuture<java.lang.Void>- Specified by:
syncin interfaceProgressivePromise<java.lang.Void>- Specified by:
syncin interfacePromise<java.lang.Void>- Throws:
java.lang.InterruptedException
-
syncUninterruptibly
ChannelProgressivePromise syncUninterruptibly()
Description copied from interface:FutureWaits for this future until it is done, and rethrows the cause of the failure if this future failed.- Specified by:
syncUninterruptiblyin interfaceChannelFuture- Specified by:
syncUninterruptiblyin interfaceChannelProgressiveFuture- Specified by:
syncUninterruptiblyin interfaceChannelPromise- Specified by:
syncUninterruptiblyin interfaceFuture<java.lang.Void>- Specified by:
syncUninterruptiblyin interfaceProgressiveFuture<java.lang.Void>- Specified by:
syncUninterruptiblyin interfaceProgressivePromise<java.lang.Void>- Specified by:
syncUninterruptiblyin interfacePromise<java.lang.Void>
-
await
ChannelProgressivePromise await() throws java.lang.InterruptedException
Description copied from interface:FutureWaits for this future to be completed.- Specified by:
awaitin interfaceChannelFuture- Specified by:
awaitin interfaceChannelProgressiveFuture- Specified by:
awaitin interfaceChannelPromise- Specified by:
awaitin interfaceFuture<java.lang.Void>- Specified by:
awaitin interfaceProgressiveFuture<java.lang.Void>- Specified by:
awaitin interfaceProgressivePromise<java.lang.Void>- Specified by:
awaitin interfacePromise<java.lang.Void>- Throws:
java.lang.InterruptedException- if the current thread was interrupted
-
awaitUninterruptibly
ChannelProgressivePromise awaitUninterruptibly()
Description copied from interface:FutureWaits for this future to be completed without interruption. This method catches anInterruptedExceptionand discards it silently.- Specified by:
awaitUninterruptiblyin interfaceChannelFuture- Specified by:
awaitUninterruptiblyin interfaceChannelProgressiveFuture- Specified by:
awaitUninterruptiblyin interfaceChannelPromise- Specified by:
awaitUninterruptiblyin interfaceFuture<java.lang.Void>- Specified by:
awaitUninterruptiblyin interfaceProgressiveFuture<java.lang.Void>- Specified by:
awaitUninterruptiblyin interfaceProgressivePromise<java.lang.Void>- Specified by:
awaitUninterruptiblyin interfacePromise<java.lang.Void>
-
setSuccess
ChannelProgressivePromise setSuccess(java.lang.Void result)
Description copied from interface:PromiseMarks this future as a success and notifies all listeners. If it is success or failed already it will throw anIllegalStateException.- Specified by:
setSuccessin interfaceChannelPromise- Specified by:
setSuccessin interfaceProgressivePromise<java.lang.Void>- Specified by:
setSuccessin interfacePromise<java.lang.Void>
-
setSuccess
ChannelProgressivePromise setSuccess()
- Specified by:
setSuccessin interfaceChannelPromise
-
setFailure
ChannelProgressivePromise setFailure(java.lang.Throwable cause)
Description copied from interface:PromiseMarks this future as a failure and notifies all listeners. If it is success or failed already it will throw anIllegalStateException.- Specified by:
setFailurein interfaceChannelPromise- Specified by:
setFailurein interfaceProgressivePromise<java.lang.Void>- Specified by:
setFailurein interfacePromise<java.lang.Void>
-
setProgress
ChannelProgressivePromise setProgress(long progress, long total)
Description copied from interface:ProgressivePromiseSets the current progress of the operation and notifies the listeners that implementGenericProgressiveFutureListener.- Specified by:
setProgressin interfaceProgressivePromise<java.lang.Void>
-
unvoid
ChannelProgressivePromise unvoid()
Description copied from interface:ChannelPromise- Specified by:
unvoidin interfaceChannelPromise
-
-