public class AsyncChannelPromise extends AsyncPromise<java.lang.Void> implements io.netty.channel.ChannelPromise
AsyncPromise and ChannelPromise
This class is all boiler plate, just ensuring we return ourselves and invoke the correct Promise method.| Constructor and Description |
|---|
AsyncChannelPromise(io.netty.channel.Channel channel) |
| Modifier and Type | Method and Description |
|---|---|
io.netty.channel.ChannelPromise |
addListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
io.netty.channel.ChannelPromise |
addListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners) |
io.netty.channel.ChannelPromise |
await() |
io.netty.channel.ChannelPromise |
awaitUninterruptibly() |
io.netty.channel.Channel |
channel() |
boolean |
isVoid() |
io.netty.channel.ChannelPromise |
removeListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
io.netty.channel.ChannelPromise |
removeListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners) |
io.netty.channel.ChannelPromise |
setFailure(java.lang.Throwable throwable) |
io.netty.channel.ChannelPromise |
setSuccess() |
io.netty.channel.ChannelPromise |
setSuccess(java.lang.Void v) |
io.netty.channel.ChannelPromise |
sync()
waits for completion; in case of failure rethrows the original exception without a new wrapping exception
so may cause problems for reporting stack traces
|
io.netty.channel.ChannelPromise |
syncUninterruptibly()
waits for completion; in case of failure rethrows the original exception without a new wrapping exception
so may cause problems for reporting stack traces
|
boolean |
trySuccess() |
io.netty.channel.ChannelPromise |
unvoid() |
static AsyncChannelPromise |
withListener(io.netty.channel.Channel channel,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
static AsyncChannelPromise |
withListener(io.netty.channel.ChannelHandlerContext context,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
static io.netty.channel.ChannelFuture |
writeAndFlush(io.netty.channel.ChannelHandlerContext context,
java.lang.Object message) |
static io.netty.channel.ChannelFuture |
writeAndFlush(io.netty.channel.ChannelHandlerContext context,
java.lang.Object message,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
static io.netty.channel.ChannelFuture |
writeAndFlush(io.netty.channel.Channel channel,
java.lang.Object message) |
static io.netty.channel.ChannelFuture |
writeAndFlush(io.netty.channel.Channel channel,
java.lang.Object message,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, get, get, getNow, isCancellable, isCancelled, isDone, isSuccess, setUncancellable, toString, tryFailure, trySuccess, uncancellable, uncancellableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetUncancellable, tryFailure, trySuccesspublic static AsyncChannelPromise withListener(io.netty.channel.ChannelHandlerContext context, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
public static AsyncChannelPromise withListener(io.netty.channel.Channel channel, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
public static io.netty.channel.ChannelFuture writeAndFlush(io.netty.channel.ChannelHandlerContext context,
java.lang.Object message,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
public static io.netty.channel.ChannelFuture writeAndFlush(io.netty.channel.Channel channel,
java.lang.Object message,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
public static io.netty.channel.ChannelFuture writeAndFlush(io.netty.channel.ChannelHandlerContext context,
java.lang.Object message)
public static io.netty.channel.ChannelFuture writeAndFlush(io.netty.channel.Channel channel,
java.lang.Object message)
public io.netty.channel.Channel channel()
channel in interface io.netty.channel.ChannelFuturechannel in interface io.netty.channel.ChannelPromisepublic boolean isVoid()
isVoid in interface io.netty.channel.ChannelFuturepublic io.netty.channel.ChannelPromise setSuccess()
setSuccess in interface io.netty.channel.ChannelPromisepublic io.netty.channel.ChannelPromise setSuccess(java.lang.Void v)
setSuccess in interface io.netty.channel.ChannelPromisesetSuccess in interface io.netty.util.concurrent.Promise<java.lang.Void>setSuccess in class AsyncPromise<java.lang.Void>public boolean trySuccess()
trySuccess in interface io.netty.channel.ChannelPromisepublic io.netty.channel.ChannelPromise setFailure(java.lang.Throwable throwable)
setFailure in interface io.netty.channel.ChannelPromisesetFailure in interface io.netty.util.concurrent.Promise<java.lang.Void>setFailure in class AsyncPromise<java.lang.Void>public io.netty.channel.ChannelPromise sync()
throws java.lang.InterruptedException
AsyncPromisesync in interface io.netty.channel.ChannelFuturesync in interface io.netty.channel.ChannelPromisesync in interface io.netty.util.concurrent.Promise<java.lang.Void>sync in class AsyncPromise<java.lang.Void>java.lang.InterruptedExceptionpublic io.netty.channel.ChannelPromise syncUninterruptibly()
AsyncPromisesyncUninterruptibly in interface io.netty.channel.ChannelFuturesyncUninterruptibly in interface io.netty.channel.ChannelPromisesyncUninterruptibly in interface io.netty.util.concurrent.Promise<java.lang.Void>syncUninterruptibly in class AsyncPromise<java.lang.Void>public io.netty.channel.ChannelPromise await()
throws java.lang.InterruptedException
await in interface io.netty.channel.ChannelFutureawait in interface io.netty.channel.ChannelPromiseawait in interface io.netty.util.concurrent.Promise<java.lang.Void>await in class AsyncPromise<java.lang.Void>java.lang.InterruptedExceptionpublic io.netty.channel.ChannelPromise awaitUninterruptibly()
awaitUninterruptibly in interface io.netty.channel.ChannelFutureawaitUninterruptibly in interface io.netty.channel.ChannelPromiseawaitUninterruptibly in interface io.netty.util.concurrent.Promise<java.lang.Void>awaitUninterruptibly in class AsyncPromise<java.lang.Void>public io.netty.channel.ChannelPromise addListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
addListener in interface io.netty.channel.ChannelFutureaddListener in interface io.netty.channel.ChannelPromiseaddListener in interface io.netty.util.concurrent.Promise<java.lang.Void>addListener in class AsyncPromise<java.lang.Void>public io.netty.channel.ChannelPromise addListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners)
addListeners in interface io.netty.channel.ChannelFutureaddListeners in interface io.netty.channel.ChannelPromiseaddListeners in interface io.netty.util.concurrent.Promise<java.lang.Void>addListeners in class AsyncPromise<java.lang.Void>public io.netty.channel.ChannelPromise removeListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
removeListener in interface io.netty.channel.ChannelFutureremoveListener in interface io.netty.channel.ChannelPromiseremoveListener in interface io.netty.util.concurrent.Promise<java.lang.Void>removeListener in class AsyncPromise<java.lang.Void>public io.netty.channel.ChannelPromise removeListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners)
removeListeners in interface io.netty.channel.ChannelFutureremoveListeners in interface io.netty.channel.ChannelPromiseremoveListeners in interface io.netty.util.concurrent.Promise<java.lang.Void>removeListeners in class AsyncPromise<java.lang.Void>public io.netty.channel.ChannelPromise unvoid()
unvoid in interface io.netty.channel.ChannelPromiseCopyright © 2009-2022 The Apache Software Foundation